Commit 8a05794a authored by Benjamin  BARDIAUX's avatar Benjamin BARDIAUX

fix(core): check if restraint is list rather than lengh

parent ab140a0d
......@@ -1283,9 +1283,9 @@ class Project(AriaBaseClass):
if format == "xml":
rest = pickler.load(restraints).restraint
# if there is only on restraint
if len(rest) < 1:
if type(rest) != type([]):
rest = [rest]
print(rest)
self.distance_restraints += rest
rest[0].getReferencePeak().getSpectrum().setListSource(udata)
......@@ -1295,7 +1295,7 @@ class Project(AriaBaseClass):
if format == "xml":
rest = pickler.load(restraints).restraint
# if there is only on restraint
if len(rest) < 1:
if type(rest) != type([]):
rest = [rest]
self.distance_restraints += rest
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment