diff --git a/data/model/legacy.py b/data/model/legacy.py index 94f799992..85b533053 100644 --- a/data/model/legacy.py +++ b/data/model/legacy.py @@ -1803,7 +1803,7 @@ def create_or_update_tag(namespace_name, repository_name, tag_name, query = _tag_alive(RepositoryTag .select() .where(RepositoryTag.repository == repo, RepositoryTag.name == tag_name)) - tag = query.get() + tag = db_for_update(query).get() tag.lifetime_end_ts = now_ts tag.save() except RepositoryTag.DoesNotExist: