Skip to content

Commit d2c1e7c

Browse files
authored
Merge pull request #391 from mongkok/test-custom-meta-setdefault
Test DjangoObjectType custom meta .setdefault()
2 parents 9cdd95c + 55dc657 commit d2c1e7c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graphene_django/tests/test_types.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ class Meta:
7676
abstract = True
7777

7878
@classmethod
79-
def __init_subclass_with_meta__(cls, _meta=None, **options):
80-
_meta = ArticleTypeOptions(cls)
81-
super(ArticleType, cls).__init_subclass_with_meta__(_meta=_meta, **options)
79+
def __init_subclass_with_meta__(cls, **options):
80+
options.setdefault('_meta', ArticleTypeOptions(cls))
81+
super(ArticleType, cls).__init_subclass_with_meta__(**options)
8282

8383
class Article(ArticleType):
8484
class Meta:

0 commit comments

Comments
 (0)