summaryrefslogtreecommitdiff
path: root/factory/base.py
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2013-06-14 23:36:25 +0200
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2013-06-14 23:36:25 +0200
commit1ba20b0ed7b920fa2d161df94a0dda3d93b1e14b (patch)
treebcf4d4291b0f451dce533ff244f87fb088b90a34 /factory/base.py
parent251ae29b4beedd7e9af721ceabb82a03f2d55bab (diff)
downloadfactory-boy-1ba20b0ed7b920fa2d161df94a0dda3d93b1e14b.tar
factory-boy-1ba20b0ed7b920fa2d161df94a0dda3d93b1e14b.tar.gz
Properly handle passed-in None in RelatedFactory (Closes #62).
Thanks to @Dhekke for the help!
Diffstat (limited to 'factory/base.py')
-rw-r--r--factory/base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/factory/base.py b/factory/base.py
index 60aa218..76d3d4a 100644
--- a/factory/base.py
+++ b/factory/base.py
@@ -380,9 +380,9 @@ class BaseFactory(object):
# Handle post-generation attributes
results = {}
for name, decl in sorted(postgen_declarations.items()):
- extracted, extracted_kwargs = postgen_attributes[name]
+ did_extract, extracted, extracted_kwargs = postgen_attributes[name]
results[name] = decl.call(obj, create, extracted,
- **extracted_kwargs)
+ factory_extracted=did_extract, **extracted_kwargs)
cls._after_postgeneration(obj, create, results)