From 54a915fa25a66d3b7732a096eba7c2dd4a7b5a8e Mon Sep 17 00:00:00 2001 From: Raphaƫl Barrois Date: Tue, 2 Apr 2013 22:51:15 +0200 Subject: declarations: minor code simplification --- factory/declarations.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'factory') 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): -- cgit v1.2.3