Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Commit

Permalink
With docker_tag unit change _last_updated is changed accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
ipanova committed Aug 30, 2016
1 parent 6773b98 commit 9e4aa62
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions plugins/pulp_docker/plugins/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,12 @@ def tag_manifest(self, repo_id, tag_name, manifest_digest):
except mongoengine.NotUniqueError:
# There is already a Tag with the given name and repo_id, so let's just make sure it's
# digest is updated. No biggie.
Tag.objects.filter(name=tag_name, repo_id=repo_id).update(
manifest_digest=manifest_digest)
# Let's check if the manifest_digest changed
tag = Tag.objects.get(name=tag_name, repo_id=repo_id)
if tag.manifest_digest != manifest_digest:
tag.manifest_digest = manifest_digest
# we don't need to set _last_updated field because it is done with pre_save signal
tag.save()
return tag


Expand Down

0 comments on commit 9e4aa62

Please sign in to comment.