Story #3209: As a user, I have Repository Versions
Add 'complete' attribute to the RepositoryVersion model
There needs to be a way to prevent the RepositoryVersion from being used before it is completely constructed.
Here is a recap of the approach used with Publications in #3184 rewritten to apply to repo versions.
- Add an attribute called 'complete' 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
created_resourceson the Task
Only 'complete' repo versions can be published
Also add docs for plugin writers specifically for when they need to create RepositoryVersion objects. They need to understand the pattern regarding 'complete'.
Please register to edit this issue