Skip to content

Commit 0e3c952

Browse files
committed
Fixed inputfield definition
1 parent 6c19593 commit 0e3c952

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graphql/type/definition.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,14 +521,14 @@ def _define_field_map(self):
521521
if callable(fields):
522522
fields = fields()
523523

524-
if not isinstance(fields, OrderedDict):
525-
fields = OrderedDict(sorted(list(fields.items())))
526-
527524
assert isinstance(fields, collections.Mapping) and len(fields) > 0, (
528525
'{} fields must be a mapping (dict / OrderedDict) with field names as keys or a '
529526
'function which returns such a mapping.'
530527
).format(self)
531528

529+
if not isinstance(fields, OrderedDict):
530+
fields = OrderedDict(sorted(list(fields.items())))
531+
532532
for field_name, field in fields.items():
533533
assert_valid_name(field_name)
534534

0 commit comments

Comments
 (0)