You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While implementing some code to set the value of a comment, we would receive an ISAModelAttributeError, even when passing in a valid string. The value is set even though the error is raised. Catching and discarding the Error allows the code to complete and function normally.
Upon inspecting the code, it appears that the @value.setter in isatools/model.py has the raise Error as the last statement of the method instead of in an else statement, as seen in @name.setter.
@value.setter
def value(self, val):
if isinstance(val, str):
self.__value = val
raise ISAModelAttributeError('Comment.value must be a string')
should be
@value.setter
def value(self, val):
if isinstance(val, str):
self.__value = val
else:
raise ISAModelAttributeError('Comment.value must be a string')
The text was updated successfully, but these errors were encountered:
While implementing some code to set the value of a comment, we would receive an ISAModelAttributeError, even when passing in a valid string. The value is set even though the error is raised. Catching and discarding the Error allows the code to complete and function normally.
Upon inspecting the code, it appears that the @value.setter in isatools/model.py has the raise Error as the last statement of the method instead of in an else statement, as seen in @name.setter.
should be
The text was updated successfully, but these errors were encountered: