Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Uses isinstance method to be more cohesive

  • Loading branch information...
commit 00b48fc2dfec752850ecf24b1f783d2c1a67d7c3 1 parent 6b8f0b6
Bernardo Fontes authored
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__]
Please sign in to comment.
Something went wrong with that request. Please try again.