Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for fields with a dyanmic default callable #360

Merged

Conversation

ericbuckley
Copy link
Contributor

some fields need to utilize a dynamic callable for their default
values. for example a field with a current timestamp, a random
string or maybe a UUID.

the current Field.clean method is caching the first invocation of
the default callable, so later uses of this field only use the cached
value. this fix removes the caching element, so each time the default
value is needed, the callable is invoked.

some fields need to utilize a dynamic callable for their default
values.  for example a field with a current timestamp, a random
string or maybe a UUID.

the current Field.clean method is caching the first invocation of
the default callable, so later uses of this field only use the cached
value.  this fix removes the caching element, so each time the default
value is needed, the callable is invoked.
bmihelac added a commit that referenced this pull request Dec 11, 2015
fix for fields with a dyanmic default callable
@bmihelac bmihelac merged commit ecede04 into django-import-export:master Dec 11, 2015
@bmihelac
Copy link
Member

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants