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:
parent
59f9a5d40f
commit
24949b2bde
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue