mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-01 18:18:31 +00:00
Rename collections to vobject_items
Like the parameter name of upload_all
This commit is contained in:
parent
6045ad97fe
commit
c57307c585
1 changed files with 4 additions and 4 deletions
|
@ -552,7 +552,7 @@ class Collection(BaseCollection):
|
|||
items.extend(
|
||||
getattr(collection, "%s_list" % content, []))
|
||||
items_by_uid = groupby(sorted(items, key=get_uid), get_uid)
|
||||
collections = {}
|
||||
vobject_items = {}
|
||||
for uid, items in items_by_uid:
|
||||
new_collection = vobject.iCalendar()
|
||||
for item in items:
|
||||
|
@ -561,14 +561,14 @@ class Collection(BaseCollection):
|
|||
# Prevent infinite loop
|
||||
for _ in range(10000):
|
||||
href = self._find_available_file_name()
|
||||
if href not in collections:
|
||||
if href not in vobject_items:
|
||||
break
|
||||
else:
|
||||
raise FileExistsError(
|
||||
errno.EEXIST, "No usable file name found")
|
||||
collections[href] = new_collection
|
||||
vobject_items[href] = new_collection
|
||||
|
||||
self.upload_all(collections)
|
||||
self.upload_all(vobject_items)
|
||||
elif props.get("tag") == "VCARD":
|
||||
for card in collection:
|
||||
self.upload(self._find_available_file_name(), card)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue