Skip to content

Commit 56e12fe

Browse files
committed
[validation.py] Fix Wrong Error Message Variables Order for hasattr Check
1 parent 7e9299e commit 56e12fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

odml/validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def object_required_attributes(obj):
134134
for arg in args:
135135
if arg[1] == 1:
136136
if not hasattr(obj, arg[0]):
137-
msg = "Missing attribute %s for %s" % (obj.format().name.capitalize(), arg[0])
137+
msg = "Missing attribute %s for %s" % (arg[0], obj.format().name.capitalize())
138138
yield ValidationError(obj, msg, LABEL_ERROR)
139139
continue
140140
obj_arg = getattr(obj, arg[0])

0 commit comments

Comments
 (0)