Source ID fields should default to a dynamic value, not a value calculated when migration was made
florianm opened this issue · comments
Florian Mayer commented
Problem
Manually entered Observations have the same static UUID4 as source_id. Does this create problems?
Reproducible example
- Step 1: Go to
- Step 2: Do
Florian Mayer commented
Changed to dynamic default following https://stackoverflow.com/a/15289517/2813717
Florian Mayer commented
Default set to callable. Can't use uuid field, as we have other string values in source_id already.
Only caveat: when adding an admin inline item, you must save and continue editing after each inline item, as the uuid is calculated before page load and will be re-used for any inline items added at the same time.
Good thing the LegacySourceMixin doesn't inherit its unique_together contraint for source and source_id.