Skip to content

Commit 449adab

Browse files
committed
switched to using field.mandatory instead of comparing with NO_DEFAULT
1 parent bae7cf4 commit 449adab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

generate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ def get_value(type_):
397397
raise NotImplementedError
398398
return value
399399

400-
if field.default is not NO_DEFAULT:
400+
if not field.mandatory:
401401
value = field.default
402402
elif field.allowed_values:
403403
value = repr(field.allowed_values[0])

0 commit comments

Comments
 (0)