Skip to content
Browse files

Uses isinstance method to be more cohesive

  • Loading branch information...
1 parent 6b8f0b6 commit 00b48fc2dfec752850ecf24b1f783d2c1a67d7c3 Bernardo Fontes committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 model_mommy/
2 model_mommy/
@@ -305,7 +305,7 @@ def generate_value(self, field, **fk_attrs):
generator = self.attr_mapping[]
elif getattr(field, 'choices'):
generator = generators.gen_from_choices(field.choices)
- elif isinstance(field, ForeignKey) and is ContentType:
+ elif isinstance(field, ForeignKey) and isinstance(, ContentType):
generator = self.type_mapping[ContentType]
elif field.__class__ in self.type_mapping:
generator = self.type_mapping[field.__class__]

0 comments on commit 00b48fc

Please sign in to comment.
Something went wrong with that request. Please try again.