Closed alukach closed 10 months ago
Redirecting to new different view...
Backup value wasn't being displayed.
CanonicalDraftEdit.get()
CanonicalDraftEdit.get_object()
getattr(record, "action", None) != Change.Actions.CREATE
Closes #555
Closed in favor of #579 & #578
What I'm changing
Bug 1
Redirecting to new different view...
Bug 2
Backup value wasn't being displayed.
How I did it
CanonicalDraftEdit.get()
for simplicity. Not sure why needed. In general, if UUID is in URL, that's the record we should return. The unique redirect logic was causing Bug 1: https://github.com/NASA-IMPACT/admg-backend/blob/1741e810df99eca522d117ec73988dc291b09076/app/admin_ui/views/v2.py#L240-L250CanonicalDraftEdit.get_object()
. Lots was going on there but it wasn't entirely clear to me why.getattr(record, "action", None) != Change.Actions.CREATE
. This would never hit because we were using a queryset of only CREATE drafts: https://github.com/NASA-IMPACT/admg-backend/blob/1741e810df99eca522d117ec73988dc291b09076/app/admin_ui/views/v2.py#L101Closes #555