1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2024-10-27 02:33:19 +00:00

fix bug in search with group option

This commit is contained in:
Adrien Waksberg 2016-10-17 18:32:34 +02:00
parent 4c9c4e21f6
commit fc8e5e7115

View file

@ -242,12 +242,12 @@ class MPW
def list(options={}) def list(options={})
result = [] result = []
search = options[:search].to_s.downcase search = options[:search].to_s.downcase
group = options[:group].to_s.downcase group = options[:group].to_s.downcase
@data.each do |item| @data.each do |item|
next if item.empty? next if item.empty?
next if not group.empty? and not group.eql?(item.group.downcase) next if not group.empty? and not group.eql?(item.group.to_s.downcase)
host = item.host.to_s.downcase host = item.host.to_s.downcase
comment = item.comment.to_s.downcase comment = item.comment.to_s.downcase