1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2024-10-27 10:43:20 +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
@remote.list.each do |r|
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,
host: r.host,
protocol: r.protocol,
user: r.user,
password: r.password,
port: r.port,
comment: r.comment
comment: r.comment,
created: r.created
)
raise @local.error_msg if not @local.add(item)
end