mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-01 18:18:31 +00:00
Use table attribute instead of string in database order by (probably fixes #59)
This commit is contained in:
parent
7266c8018f
commit
0e5ef007f1
1 changed files with 2 additions and 2 deletions
|
@ -116,7 +116,7 @@ class Collection(ical.Collection):
|
|||
items = (
|
||||
self.session.query(DBItem)
|
||||
.filter_by(collection_path=self.path, tag=item_type.tag)
|
||||
.order_by("name").all())
|
||||
.order_by(DBItem.name).all())
|
||||
for item in items:
|
||||
text = "\n".join(
|
||||
"%s:%s" % (line.key, line.value) for line in item.lines)
|
||||
|
@ -189,7 +189,7 @@ class Collection(ical.Collection):
|
|||
headers = (
|
||||
self.session.query(DBHeader)
|
||||
.filter_by(collection_path=self.path)
|
||||
.order_by("key").all())
|
||||
.order_by(DBHeader.key).all())
|
||||
return [
|
||||
ical.Header("%s:%s" % (header.key, header.value))
|
||||
for header in headers]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue