mirror of
https://github.com/nishiki/manage-password.git
synced 2024-11-27 07:33:05 +00:00
cli: fix update function
This commit is contained in:
parent
b86e095a60
commit
38beb7ad53
1 changed files with 3 additions and 1 deletions
|
@ -198,13 +198,15 @@ class Cli
|
||||||
options.delete_if { |k,v| v.empty? }
|
options.delete_if { |k,v| v.empty? }
|
||||||
|
|
||||||
item.update(options)
|
item.update(options)
|
||||||
@mpw.encrypt
|
@mpw.set_password(item.id, password) if not password.empty?
|
||||||
@mpw.write_data
|
@mpw.write_data
|
||||||
|
|
||||||
puts "#{I18n.t('form.update.valid')}".green
|
puts "#{I18n.t('form.update.valid')}".green
|
||||||
else
|
else
|
||||||
puts I18n.t('display.nothing')
|
puts I18n.t('display.nothing')
|
||||||
end
|
end
|
||||||
|
rescue Exception => e
|
||||||
|
puts "#{I18n.t('display.error')} #14: #{e}".red
|
||||||
end
|
end
|
||||||
|
|
||||||
# Remove an item
|
# Remove an item
|
||||||
|
|
Loading…
Reference in a new issue