Task #3222

Updated by bmbouter about 3 years ago

h2. Motivation

There needs to be a way to prevent the RepositoryVersion from being used before it is completely constructed.

h2. Design

Here is a recap of the approach used with Publications in #3184 rewritten to apply to
- only 'complete' repo versions.

* Add an attribute called 'complete'
versions are visible to RepositoryVersion which defaults to False.
* Update
the viewset so that it excludes RepositoryVersion objects that have complete=False
* Update the filterset for RepositoryVersion objects to also exclude RepositoryVersion that have complete=False
* After the plugin code returns control to core, have core set complete=True on the RepositoryVersion and then call save() before setting the <code>created_resources</code> on the Task

h2. Additional Requirements:

- only
'complete' repo versions can be published
Also add

docs for plugin writers when they need to set complete=True