mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
DELETE requests can delete calendars (closes #514)
This commit is contained in:
parent
bfe527dd41
commit
1f2f39a87a
3 changed files with 25 additions and 8 deletions
|
@ -153,7 +153,12 @@ def delete(path, calendar):
|
|||
|
||||
"""
|
||||
# Reading request
|
||||
calendar.remove(name_from_path(path, calendar))
|
||||
if calendar.local_path == path.strip("/"):
|
||||
# Delete the whole calendar
|
||||
calendar.delete()
|
||||
else:
|
||||
# Remove an item from the calendar
|
||||
calendar.remove(name_from_path(path, calendar))
|
||||
|
||||
# Writing answer
|
||||
multistatus = ET.Element(_tag("D", "multistatus"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue