From b7e3503372e0043ed6e0185b6546043457173bc8 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Wed, 18 Oct 2017 16:35:37 -0700 Subject: Fix inability to delete container registry tags Because container registry tags can have periods, the addition of the `.json` format caused ambiguity. Since the tag name regex is greedy, it would attempt to locate an image named `foo.json` instead of `foo`. Closes #39260 --- app/serializers/container_tag_entity.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/serializers') diff --git a/app/serializers/container_tag_entity.rb b/app/serializers/container_tag_entity.rb index 26a68c43807..8f1488e6cbb 100644 --- a/app/serializers/container_tag_entity.rb +++ b/app/serializers/container_tag_entity.rb @@ -4,7 +4,7 @@ class ContainerTagEntity < Grape::Entity expose :name, :location, :revision, :short_revision, :total_size, :created_at expose :destroy_path, if: -> (*) { can_destroy? } do |tag| - project_registry_repository_tag_path(project, tag.repository, tag.name, format: :json) + project_registry_repository_tag_path(project, tag.repository, tag.name) end private -- cgit v1.2.1