mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-10 18:40:53 +00:00
Merge pull request #305 from untitaker/database-props
Don't discard PROPPATCH on empty collections.
This commit is contained in:
commit
f112a9b390
1 changed files with 3 additions and 5 deletions
|
@ -243,14 +243,12 @@ class Collection(ical.Collection):
|
||||||
old_properties = properties.copy()
|
old_properties = properties.copy()
|
||||||
yield properties
|
yield properties
|
||||||
# On exit
|
# On exit
|
||||||
if self._db_collection and old_properties != properties:
|
if old_properties != properties:
|
||||||
for prop in db_properties:
|
for prop in db_properties:
|
||||||
self.session.delete(prop)
|
self.session.delete(prop)
|
||||||
for name, value in properties.items():
|
for name, value in properties.items():
|
||||||
prop = DBProperty()
|
prop = DBProperty(name=name, value=value or '',
|
||||||
prop.name = name
|
collection_path=self.path)
|
||||||
prop.value = value
|
|
||||||
prop.collection_path = self.path
|
|
||||||
self.session.add(prop)
|
self.session.add(prop)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue