mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 05:32:57 +02:00
Fix custom column creation.
This commit is contained in:
parent
1f19aba68a
commit
179919d670
1 changed files with 4 additions and 2 deletions
|
|
@ -467,7 +467,8 @@ def create_custom_column(self, label, name, datatype, is_multiple,
|
|||
books_ratings_link as bl,
|
||||
ratings as r
|
||||
WHERE {lt}.value={table}.id and bl.book={lt}.book and
|
||||
r.id = bl.rating and r.rating <> 0) avg_rating
|
||||
r.id = bl.rating and r.rating <> 0) avg_rating,
|
||||
value AS sort
|
||||
FROM {table};
|
||||
|
||||
CREATE VIEW tag_browser_filtered_{table} AS SELECT
|
||||
|
|
@ -481,7 +482,8 @@ def create_custom_column(self, label, name, datatype, is_multiple,
|
|||
ratings as r
|
||||
WHERE {lt}.value={table}.id AND bl.book={lt}.book AND
|
||||
r.id = bl.rating AND r.rating <> 0 AND
|
||||
books_list_filter(bl.book)) avg_rating
|
||||
books_list_filter(bl.book)) avg_rating,
|
||||
value AS sort
|
||||
FROM {table};
|
||||
|
||||
'''.format(lt=lt, table=table),
|
||||
|
|
|
|||
Loading…
Reference in a new issue