mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-10 18:40:53 +00:00
Update PROPPATCH to new storage API
This commit is contained in:
parent
472d016d1e
commit
e8c1defe6a
2 changed files with 13 additions and 14 deletions
|
@ -353,7 +353,12 @@ class Collection:
|
|||
if os.path.exists(props_path):
|
||||
with open(props_path, encoding=STORAGE_ENCODING) as prop_file:
|
||||
properties.update(json.load(prop_file))
|
||||
properties[key] = value
|
||||
|
||||
if value:
|
||||
properties[key] = value
|
||||
else:
|
||||
properties.pop(key, None)
|
||||
|
||||
with open(props_path, "w+", encoding=STORAGE_ENCODING) as prop_file:
|
||||
json.dump(properties, prop_file)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue