diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2013-04-02 22:51:15 +0200 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2013-04-02 22:51:15 +0200 |
commit | 54a915fa25a66d3b7732a096eba7c2dd4a7b5a8e (patch) | |
tree | 080fef970ba55ffa6c79754b69fb901bb482bcc4 /factory | |
parent | 7a7bfc750605701cb7d82656e918a5b375fbc385 (diff) | |
download | factory-boy-54a915fa25a66d3b7732a096eba7c2dd4a7b5a8e.tar factory-boy-54a915fa25a66d3b7732a096eba7c2dd4a7b5a8e.tar.gz |
declarations: minor code simplification
Diffstat (limited to 'factory')
-rw-r--r-- | factory/declarations.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/factory/declarations.py b/factory/declarations.py index a284930..2122bd2 100644 --- a/factory/declarations.py +++ b/factory/declarations.py @@ -320,10 +320,7 @@ class SubFactory(ParameteredAttribute): override the wrapped factory's defaults """ subfactory = self.get_factory() - if create: - return subfactory.create(**params) - else: - return subfactory.build(**params) + return subfactory.simple_generate(create, **params) class PostGenerationDeclaration(object): |