mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-02 12:44:15 +03:00
Fixed field ordering adding reverse related fields at the end
This commit is contained in:
parent
97224c6083
commit
ea95ca2b0c
|
@ -27,8 +27,8 @@ class DjangoObjectTypeMeta(ObjectTypeMeta):
|
|||
only_fields = cls._meta.only_fields
|
||||
reverse_fields = get_reverse_fields(cls._meta.model)
|
||||
all_fields = sorted(list(cls._meta.model._meta.fields) +
|
||||
list(reverse_fields) +
|
||||
list(cls._meta.model._meta.local_many_to_many))
|
||||
all_fields += list(reverse_fields)
|
||||
|
||||
for field in all_fields:
|
||||
is_not_in_only = only_fields and field.name not in only_fields
|
||||
|
|
Loading…
Reference in New Issue
Block a user