1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2024-12-03 17:53:04 +00:00

fix sync when add new item

This commit is contained in:
nishiki 2015-02-08 22:47:52 +01:00
parent 59f9a5d40f
commit 24949b2bde

View file

@ -104,14 +104,16 @@ module MPW
# Add item # Add item
@remote.list.each do |r| @remote.list.each do |r|
if r.last_edit > @config.last_update if r.last_edit > @config.last_update
item = Item.new(name: r.name, item = Item.new(id: r.id,
name: r.name,
group: r.group, group: r.group,
host: r.host, host: r.host,
protocol: r.protocol, protocol: r.protocol,
user: r.user, user: r.user,
password: r.password, password: r.password,
port: r.port, port: r.port,
comment: r.comment comment: r.comment,
created: r.created
) )
raise @local.error_msg if not @local.add(item) raise @local.error_msg if not @local.add(item)
end end