Use empty string for custom fields name/value when empty (returned as null from api)
Fixes #2
This commit is contained in:
parent
9fc8bcf9a8
commit
ef90e20d42
@ -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"]}'
|
||||
|
4
item.py
4
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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user