Project

Profile

Help

Story #3274

closed

Story #3209: As a user, I have Repository Versions

As a user, the task created by sync includes the RepositoryVersion created_resource

Added by amacdona@redhat.com almost 7 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 31
Quarter:

Description

This came up as part of the work to move the sync task to the plugin:
https://github.com/pulp/pulp_file/pull/24/files#r160791272

In a transaction, the sync task needs to instantiate and save a Repository Version, and instantiate and save a CreatedResource(content_object=repo_version).

Hints:

This didn't work as expected, so I decided to not to do this story as part of https://pulp.plan.io/issues/3260

After the CreatedResource was saved to the db, the instance contained the expected attribute, content_object, but the saved object in the db did not have that attribute.

From: django shell

In [7]: cr = CreatedResource.objects.get(pk="8b34d83c-d4f4-43c4-8311-f38311bb1c48")

In [8]: cr
Out[8]: <CreatedResource: pk=8b34d83c-d4f4-43c4-8311-f38311bb1c48>

In [9]: cr.content_object is None
Out[9]: True

Also available in: Atom PDF