NASA-IMPACT / admg-backend

Apache License 2.0
2 stars 0 forks source link

Avoid referencing non-existent model instances if a Deployment Create Draft is unpublished #504

Closed edkeeble closed 1 year ago

edkeeble commented 1 year ago

If a deployment has a model_instance_uuid, use that when creating related objects. If it does not, use the UUID of the draft.

For unpublished create drafts, this should create the correct reference, since the UUID of that draft will be persisted to the Deployment model when it is published.