Skip to content

Commit

Permalink
allow 'none' as a special tag to explicitly reference untagged servers
Browse files Browse the repository at this point in the history
  • Loading branch information
Ithanil committed Dec 4, 2024
1 parent 1dfc973 commit 8fac157
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def self.find_available(tags_arg = nil)
unless tags.nil?
ids_loads_tagged = []
tags.each do |tag|
ids_loads_tagged.concat ids_loads.select { |myid, _| redis.hget(key(myid), 'tag') == tag }
ids_loads_tagged.concat ids_loads.select { |myid, _| (redis.hget(key(myid), 'tag') || "none") == tag }
end
ids_loads_tagged.sort_by! { |id_load| id_load[1] }
end
Expand Down

0 comments on commit 8fac157

Please sign in to comment.