Skip to content

Commit

Permalink
Fixes #27663 - Make ansible var keys unique (#297)
Browse files Browse the repository at this point in the history
(cherry picked from commit f36b9f1)
  • Loading branch information
xprazak2 authored and ares committed Sep 9, 2019
1 parent d1cea3f commit d2e9004
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/ansible_variable.rb
Expand Up @@ -4,6 +4,7 @@
class AnsibleVariable < LookupKey
belongs_to :ansible_role, :inverse_of => :ansible_variables
validates :ansible_role_id, :presence => true
validates :key, :uniqueness => { :scope => :ansible_role_id }
scoped_search :on => :key, :aliases => [:name], :complete_value => true
scoped_search :on => :imported, :complete_value => { :true => true, :false => false }
scoped_search :relation => :ansible_role, :on => :name,
Expand Down

0 comments on commit d2e9004

Please sign in to comment.