summaryrefslogtreecommitdiff
path: root/factory/declarations.py
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2012-07-09 20:27:52 +0200
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2012-07-09 20:27:52 +0200
commitcc1f59b3fe772c0e4b18f620192233d56e94a4e4 (patch)
tree7de32036c835cc3eb6d46995d755349b6d2a156e /factory/declarations.py
parent4a683034ae2d53adf9d2faa94051393646d65725 (diff)
downloadfactory-boy-cc1f59b3fe772c0e4b18f620192233d56e94a4e4.tar
factory-boy-cc1f59b3fe772c0e4b18f620192233d56e94a4e4.tar.gz
Fix PostGenerationDeclaration.extract.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Diffstat (limited to 'factory/declarations.py')
-rw-r--r--factory/declarations.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/factory/declarations.py b/factory/declarations.py
index 6b53c88..83c32ab 100644
--- a/factory/declarations.py
+++ b/factory/declarations.py
@@ -275,11 +275,11 @@ class PostGenerationDeclaration(object):
(object, dict): a tuple containing the attribute at 'name' (if
provided) and a dict of extracted attributes
"""
- extracted = attrs.pop(name, None)
if self.extract_prefix:
extract_prefix = self.extract_prefix
else:
extract_prefix = name
+ extracted = attrs.pop(extract_prefix, None)
kwargs = utils.extract_dict(extract_prefix, attrs)
return extracted, kwargs