Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
importers: call Cipher#migrate_data! before saving
Browse files Browse the repository at this point in the history
These tools need to be updated to put data into their new native
fields, but for now just migrate from the old data field.

See #41 and #45
  • Loading branch information
jcs committed Mar 27, 2018
1 parent 7639cbb commit ae3744e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/1password_import.rb
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ def save_field(cdata, field)

c.data = cdata.to_json

# TODO: convert data to each field natively
c.migrate_data!

to_save[c.type] ||= []
to_save[c.type].push c
end
Expand Down
3 changes: 3 additions & 0 deletions tools/bitwarden_import.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ def get_or_create_folder_uuid(str)

c.data = cdata.to_json

# TODO: convert data to each field natively
c.migrate_data!

to_save[c.type] ||= []
to_save[c.type].push c
end
Expand Down
3 changes: 3 additions & 0 deletions tools/keepass_import.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ def getEntries(db)

c.data = cdata.to_json

# TODO: convert data to each field natively
c.migrate_data!

@to_save[c.type] ||= []
@to_save[c.type].push c

Expand Down
3 changes: 3 additions & 0 deletions tools/lastpass_import.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ def get_or_create_folder_uuid(str)

c.data = cdata.to_json

# TODO: convert data to each field natively
c.migrate_data!

to_save[c.type] ||= []
to_save[c.type].push c

Expand Down

0 comments on commit ae3744e

Please sign in to comment.