Commit a222486c authored by Grzegorz Bizon's avatar Grzegorz Bizon

Rename method for checking tags in container repository

This is important because method `empty?` is triggered when validation
happens, and we don't want to make API request to registry when record
is validated.
parent 95faf5f5
...@@ -42,6 +42,12 @@ class ContainerRepository < ActiveRecord::Base ...@@ -42,6 +42,12 @@ class ContainerRepository < ActiveRecord::Base
ContainerRegistry::Blob.new(self, config) ContainerRegistry::Blob.new(self, config)
end end
# TODO, specs needed
#
def has_tags?
tags.any?
end
# TODO, add bang to this method # TODO, add bang to this method
# #
def delete_tags def delete_tags
...@@ -53,12 +59,6 @@ class ContainerRepository < ActiveRecord::Base ...@@ -53,12 +59,6 @@ class ContainerRepository < ActiveRecord::Base
end end
end end
# TODO, specs needed
#
def empty?
tags.none?
end
# TODO, we will return a new ContainerRepository object here # TODO, we will return a new ContainerRepository object here
# #
def self.project_from_path(repository_path) def self.project_from_path(repository_path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment