-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add touch to QuerySets of artifacts or content #1537
Conversation
Ha! I actually had the same idea while reviewing these plugins PRs. |
@@ -470,7 +482,7 @@ class Content(MasterModel, QueryMixin): | |||
_artifacts = models.ManyToManyField(Artifact, through="ContentArtifact") | |||
timestamp_of_interest = models.DateTimeField(auto_now=True) | |||
|
|||
objects = ContentManager() | |||
objects = ContentManager.from_queryset(BulkTouchQuerySet)() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it wasn't for the content_pks
parameter, i think we could move orphaned
to the query set as well.
But it would change an interface now.
Attached issue: https://pulp.plan.io/issues/9234 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
A unit test would be nice but not required.
We believe this will get test coverage, once it's been used by #1553 . |
fixes TBA
This was just a random thought i had when writing these lines: https://github.com/pulp/pulp_container/blob/d25b01d4fb8aed1b264a9dcfc91461fe92d630b8/pulp_container/app/viewsets.py#L748
Not sure if it really helps there, also it's really kind of late for 3.14. If you like this i can do the issue dance for it.