mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Use X-WR-CALNAME and X-WR-CALDESC when uploading calendar
This commit is contained in:
parent
b04c5e81ca
commit
81c596eb1d
1 changed files with 12 additions and 1 deletions
|
@ -878,7 +878,18 @@ class Application:
|
||||||
return BAD_REQUEST
|
return BAD_REQUEST
|
||||||
|
|
||||||
if write_whole_collection:
|
if write_whole_collection:
|
||||||
props = {"tag": tag} if tag else {}
|
props = {}
|
||||||
|
if tag:
|
||||||
|
props["tag"] = tag
|
||||||
|
if tag == "VCALENDAR" and items:
|
||||||
|
if hasattr(items[0], "x_wr_calname"):
|
||||||
|
calname = items[0].x_wr_calname.value
|
||||||
|
if calname:
|
||||||
|
props["D:displayname"] = calname
|
||||||
|
if hasattr(items[0], "x_wr_caldesc"):
|
||||||
|
caldesc = items[0].x_wr_caldesc.value
|
||||||
|
if caldesc:
|
||||||
|
props["C:calendar-description"] = caldesc
|
||||||
try:
|
try:
|
||||||
storage.check_and_sanitize_props(props)
|
storage.check_and_sanitize_props(props)
|
||||||
new_item = self.Collection.create_collection(
|
new_item = self.Collection.create_collection(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue