summaryrefslogtreecommitdiff
path: root/factory
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polyconseil.fr>2012-06-01 13:35:46 +0200
committerRaphaël Barrois <raphael.barrois@polyconseil.fr>2012-06-01 13:35:46 +0200
commit18393e00d21276ba7f8b6d83b51510470781ec69 (patch)
tree43b3774535a60ca1c92dbe677f5e80b368fa3f5c /factory
parentf60ae420b8505100b9079a6c695074ef12c5e7c7 (diff)
downloadfactory-boy-18393e00d21276ba7f8b6d83b51510470781ec69.tar
factory-boy-18393e00d21276ba7f8b6d83b51510470781ec69.tar.gz
Fix sequence count for SubFactory (Closes #16).
Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
Diffstat (limited to 'factory')
-rw-r--r--factory/declarations.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/factory/declarations.py b/factory/declarations.py
index 828d8a7..6b53c88 100644
--- a/factory/declarations.py
+++ b/factory/declarations.py
@@ -244,12 +244,10 @@ class SubFactory(OrderedDeclaration):
defaults.update(extra)
defaults['__containers'] = containers
- attrs = self.factory.attributes(create, defaults)
-
if create:
- return self.factory.create(**attrs)
+ return self.factory.create(**defaults)
else:
- return self.factory.build(**attrs)
+ return self.factory.build(**defaults)
class PostGenerationDeclaration(object):