Skip to content

Commit

Permalink
A different approach
Browse files Browse the repository at this point in the history
  • Loading branch information
amureki committed Aug 9, 2024
1 parent 5044e75 commit c131810
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions model_bakery/baker.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
overload,
)

from django import VERSION as DJANGO_VERSION
from django.apps import apps
from django.conf import settings
from django.db.models import (
Expand Down Expand Up @@ -604,7 +603,7 @@ def _skip_field(self, field: Field) -> bool: # noqa: C901
]

if BAKER_CONTENTTYPES:
other_fields_to_skip.append(GenericRelation)
other_fields_to_skip.extend([GenericForeignKey, GenericRelation])

if isinstance(field, tuple(other_fields_to_skip)):
return True
Expand Down

0 comments on commit c131810

Please sign in to comment.