Fix existing passwords without id

This commit is contained in:
Antonio J. Delgado 2024-12-06 20:46:53 +02:00
parent cfa8b12398
commit 84d3f341bd
2 changed files with 10 additions and 1 deletions

View file

@ -930,9 +930,17 @@ class NextcloudHandler:
}
)
else:
if update:
if update and 'id' in exists_password:
new_obj['id'] = exists_password['id']
return self.update_password(new_obj)
if 'id' not in exists_password:
self.debug(
{
"action": "create_password",
"message": "Found an existing password without an 'id'",
"existing_password": exists_password
}
)
self.warning(
{
"action": "create_password",

View file

@ -5,3 +5,4 @@ pysodium
passpy
secretstorage
pyyaml
libsodium