Commit 8e04c8ed authored by eric pellegrini's avatar eric pellegrini
Browse files

Added raise condition for weights configurator

parent 484f4101
......@@ -66,6 +66,9 @@ class WeightsConfigurator(SingleChoiceConfigurator):
:type value: one of the numeric properties of MDANSE.Data.ElementsDatabase.ElementsDatabase
'''
if not isinstance(value,basestring):
raise ConfiguratorError("Invalid type for weight. Must be a string.", self)
value = value.lower()
if not value in ELEMENTS.numericProperties:
......
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