diff --git a/bitwarden-to-keepass.py b/bitwarden-to-keepass.py index 7dc2648..b7aa2c8 100644 --- a/bitwarden-to-keepass.py +++ b/bitwarden-to-keepass.py @@ -69,7 +69,7 @@ def bitwarden_to_keepass(args): break # todo append additional uris to notes? for field in bw_item.get_custom_fields(): - entry.set_custom_property(str(field['name']), field['value']) + entry.set_custom_property(field['name'], field['value']) for attachment in bw_item.get_attachments(): attachment_tmp_path = f'/tmp/attachment/{attachment["fileName"]}' diff --git a/item.py b/item.py index 05fc1eb..1f6d5c6 100644 --- a/item.py +++ b/item.py @@ -47,6 +47,10 @@ class Item: if 'fields' not in self.item: return [] + for field in self.item['fields']: + field['name'] = field['name'] if field['name'] is not None else '' + field['value'] = field['value'] if field['value'] is not None else '' + return self.item['fields'] def get_attachments(self):