Admin's "save as" does not work on records with unique constraints
|Reported by:||shelldweller||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I would like to propose a change of behaviour for admin's "save as" functionality. Instead of blindly creating a duplicate with a new ID, open add new object view prepoulated with values dynamically pulled from the object we are copying. IMO, this is better for several reasons:
- We rarely (or perhaps never) want a complete duplicate. "Save as" is just a shortcut for copy-pasting. Ability to edit object prior to saving results in better user experience.
- Presently "save as" does not work on models with unique constraints or custom primary keys (which are not AutoField). When presented with edit form choice the user will be able to address those constraints accordingly.
If there is a concern about altering existing behaviour, perhaps there can be two distinct options: 1) "Save as new" (current functionality), and 2) "Save as..." (new functionality, triple dot implies that user input is expected.)