1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-01 18:18:31 +00:00

Added support for webcal-subscriptions

This commit is contained in:
leso-kn 2022-04-12 09:50:05 +02:00
parent afff2731e1
commit 94a5ff0d68
No known key found for this signature in database
GPG key ID: 46333567BC1BF351
3 changed files with 16 additions and 4 deletions

View file

@ -91,7 +91,7 @@ def check_and_sanitize_items(
The ``tag`` of the collection.
"""
if tag and tag not in ("VCALENDAR", "VADDRESSBOOK"):
if tag and tag not in ("VCALENDAR", "VADDRESSBOOK", "VSUBSCRIBED"):
raise ValueError("Unsupported collection tag: %r" % tag)
if not is_collection and len(vobject_items) != 1:
raise ValueError("Item contains %d components" % len(vobject_items))
@ -230,7 +230,7 @@ def check_and_sanitize_props(props: MutableMapping[Any, Any]
raise ValueError("Value of %r must be %r not %r: %r" % (
k, str.__name__, type(v).__name__, v))
if k == "tag":
if v not in ("", "VCALENDAR", "VADDRESSBOOK"):
if v not in ("", "VCALENDAR", "VADDRESSBOOK", "VSUBSCRIBED"):
raise ValueError("Unsupported collection tag: %r" % v)
return props