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:
parent
863c70f35f
commit
05b1e8296c
3 changed files with 61 additions and 24 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue