1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-06-26 16:45:52 +00:00

Check collection properties

This commit is contained in:
Unrud 2017-07-22 21:25:36 +02:00 committed by Unrud
parent 863c70f35f
commit 05b1e8296c
3 changed files with 61 additions and 24 deletions

View file

@ -998,12 +998,18 @@ def proppatch(base_prefix, path, xml_request, collection):
href.text = _href(base_prefix, path)
response.append(href)
for short_name in props_to_remove:
props_to_set[short_name] = ""
collection.set_meta(props_to_set)
for short_name in props_to_set:
new_props = collection.get_meta()
for short_name, value in props_to_set.items():
new_props[short_name] = value
_add_propstat_to(response, short_name, 200)
for short_name in props_to_remove:
try:
del new_props[short_name]
except KeyError:
pass
_add_propstat_to(response, short_name, 200)
storage.check_and_sanitize_props(new_props)
collection.set_meta_all(new_props)
return multistatus