aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2013-04-02 22:51:15 +0200
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2013-04-02 22:51:15 +0200
commit54a915fa25a66d3b7732a096eba7c2dd4a7b5a8e (patch)
tree080fef970ba55ffa6c79754b69fb901bb482bcc4
parent7a7bfc750605701cb7d82656e918a5b375fbc385 (diff)
downloadfactory-boy-54a915fa25a66d3b7732a096eba7c2dd4a7b5a8e.tar
factory-boy-54a915fa25a66d3b7732a096eba7c2dd4a7b5a8e.tar.gz
declarations: minor code simplification
-rw-r--r--factory/declarations.py5
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):