1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-25 19:30:54 +00:00

move check predefined_collections props to config.py

This commit is contained in:
IM 2024-05-03 23:07:04 +03:00
parent f7e01d55ed
commit 515afb52ed
2 changed files with 7 additions and 4 deletions

View file

@ -48,7 +48,6 @@ from radicale.app.propfind import ApplicationPartPropfind
from radicale.app.proppatch import ApplicationPartProppatch
from radicale.app.put import ApplicationPartPut
from radicale.app.report import ApplicationPartReport
from radicale.item import check_and_sanitize_props
from radicale.log import logger
# Combination of types.WSGIStartResponse and WSGI application return value
@ -274,8 +273,7 @@ class Application(ApplicationPartDelete, ApplicationPartHead,
jsn_coll = self.configuration.get("storage", "predefined_collections")
for (name_coll, props) in jsn_coll.items():
try:
checked_props = check_and_sanitize_props(props)
self._storage.create_collection(principal_path + name_coll, props=checked_props)
self._storage.create_collection(principal_path + name_coll, props=props)
except ValueError as e:
logger.warning("Failed to create predefined collection %r: %s", name_coll, e)
except ValueError as e: