From 07ca1de7377d6b77480afe6eb572f1d241ad0464 Mon Sep 17 00:00:00 2001 From: Urban Rotnik Date: Mon, 22 Jun 2020 07:30:49 +0200 Subject: [PATCH] Fix valdiation for snapshot selection --- app/models/repository_snapshot.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/repository_snapshot.rb b/app/models/repository_snapshot.rb index bd5020feb..76df07e13 100644 --- a/app/models/repository_snapshot.rb +++ b/app/models/repository_snapshot.rb @@ -13,7 +13,7 @@ class RepositorySnapshot < RepositoryBase validates :name, presence: true, length: { maximum: Constants::NAME_MAX_LENGTH } validates :status, presence: true - validate :only_one_selected_for_my_module, if: ->(obj) { obj.changed.include? :selected } + validate :only_one_selected_for_my_module, if: ->(obj) { obj.changed.include? 'selected' } def default_columns_count Constants::REPOSITORY_SNAPSHOT_TABLE_DEFAULT_STATE['length']