fix: copy the dictionary instead of the link to it

This prevents appending the same tag multiple times.
This commit is contained in:
Александр Степченко 2023-07-18 13:24:02 +03:00 committed by Alexander Stepchenko
parent 1765ef9da8
commit dc01d5c886

View File

@ -55,7 +55,7 @@ class Tags:
if self._tags is None:
tags = [branch]
else:
tags = self._tags[image.canonical_name][branch]
tags = self._tags[image.canonical_name][branch].copy()
if branch == self._latest:
tags.append("latest")
return tags