We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3409c0 commit 20f02f4Copy full SHA for 20f02f4
odml/validation.py
@@ -133,8 +133,9 @@ def object_required_attributes(obj):
133
for arg in args:
134
if arg[1] == 1:
135
if not hasattr(obj, arg[0]):
136
- msg = "%s has no attribute %s" % (obj.format().name.capitalize(), arg[0])
137
- yield AttributeError(obj, msg, LABEL_WARNING)
+ msg = "Missing attribute %s for %s" % (obj.format().name.capitalize(), arg[0])
+ yield ValidationError(obj, msg, LABEL_WARNING)
138
+ return
139
obj_arg = getattr(obj, arg[0])
140
if not obj_arg and not isinstance(obj_arg, bool):
141
msg = "%s %s undefined" % (obj.format().name.capitalize(), arg[0])
0 commit comments