Changes between Initial Version and Version 2 of Ticket #28188


Ignore:
Timestamp:
05/09/2017 07:47:46 AM (3 years ago)
Author:
Adam Alton
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28188

    • Property Status changed from new to assigned
    • Property Severity changed from Normal to Release blocker
    • Property Component changed from Uncategorized to Database layer (models, ORM)
    • Property Summary changed from Field._get_default prevents model fields from being pickled to Field._get_default() prevents model fields from being pickled
    • Property Owner changed from nobody to Adam Alton
    • Property Type changed from Uncategorized to Bug
    • Property Triage Stage changed from Unreviewed to Accepted
  • 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