Changes between Initial Version and Version 2 of Ticket #28188


Ignore:
Timestamp:
May 9, 2017, 7:47:46 AM (8 years ago)
Author:
Adam Alton
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28188

    • Property Component UncategorizedDatabase layer (models, ORM)
    • Property Severity NormalRelease blocker
    • Property Triage Stage UnreviewedAccepted
    • Property Summary Field._get_default prevents model fields from being pickledField._get_default() prevents model fields from being pickled
    • Property Type UncategorizedBug
    • Property Owner changed from nobody to Adam Alton
    • Property Status newassigned
  • Ticket #28188 – Description

    initial v2  
    1313My proposed solution is to simply move the ''if callable()'' check back out into the ''get_default'' method.  This would mean that we lose a very minor bit of efficiency because we have to run that one ''if'' statement each time that ''get_default'' is called, but the rest of the logic would remain inside the cached ''_get_default'' method.
    1414
    15 I have made a commit here which contains my proposed fix and a test to prevent regression: https://github.com/adamalton/django/commit/a7c3f672d2ea45df2fdea8cad6ffcfa10172b133
     15I have made a commit here which contains my proposed fix and a test to prevent regression: https://github.com/adamalton/django/commit/ee6aafacfd01f2603943e8c4183805fd4a298355
    1616
Back to Top