Switched ILIKE to = in checking if project is already in a repository

This commit is contained in:
Wedge 2016-02-17 10:30:44 +03:00
parent 4bdca17ce8
commit b6eaea9c9a
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ class ProjectToRepository < ActiveRecord::Base
end
def one_project_in_platform_repositories
if Project.joins(repositories: :platform).where('platforms.id = ?', repository.platform_id).by_name(project.name).exists?
if Project.joins(repositories: :platform).where('platforms.id = ?', repository.platform_id).where(:name => project.name).exists?
errors.add(:base, I18n.t('activerecord.errors.project_to_repository.project'))
end
end