RepositoryVersion.create() can't be called outside of a task
Docker push requires creating a repository version without dispatching a task. This is currently impossible because the RepositoryVersion.create() method always creates a CreatedResource. A CreatedResource requires a task_id to be saved to the database.
Have the RepositoryVersion.create() check if it's running inside a task. You can do that with Task.current .
Updated by email@example.com over 4 years ago
This was filed as part of the docker push workflow work. A possible alternative solution to the problem has been discussed on IRC. This solution would allow plugin writers to create content sets that are not repository versions. Plugin writers would then be able to dispatch a task to either create a repository version from that whole set or to add that content to an existing repository version.