mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-01-31 11:48:38 +03:00
Merge pull request #391 from mongkok/test-custom-meta-setdefault
Test DjangoObjectType custom meta .setdefault()
This commit is contained in:
commit
d2c1e7c87b
|
@ -76,9 +76,9 @@ def test_django_objecttype_with_custom_meta():
|
|||
abstract = True
|
||||
|
||||
@classmethod
|
||||
def __init_subclass_with_meta__(cls, _meta=None, **options):
|
||||
_meta = ArticleTypeOptions(cls)
|
||||
super(ArticleType, cls).__init_subclass_with_meta__(_meta=_meta, **options)
|
||||
def __init_subclass_with_meta__(cls, **options):
|
||||
options.setdefault('_meta', ArticleTypeOptions(cls))
|
||||
super(ArticleType, cls).__init_subclass_with_meta__(**options)
|
||||
|
||||
class Article(ArticleType):
|
||||
class Meta:
|
||||
|
|
Loading…
Reference in New Issue
Block a user