diff options
Diffstat (limited to 'factory/base.py')
-rw-r--r-- | factory/base.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/factory/base.py b/factory/base.py index 3ebc746..44d58a7 100644 --- a/factory/base.py +++ b/factory/base.py @@ -527,7 +527,8 @@ class Factory(BaseFactory): creation_function = getattr(cls, '_creation_function', ()) if creation_function and creation_function[0]: return creation_function[0] - elif cls._create.__func__ == Factory._create.__func__: + elif cls._create.__func__ == Factory._create.__func__ and \ + hasattr(cls._associated_class, 'objects'): # Backwards compatibility. # Default creation_function and default _create() behavior. # The best "Vanilla" _create detection algorithm I found is relying |