Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
05139e53
Commit
05139e53
authored
Mar 07, 2021
by
cbartondock
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advanced shelf search is working
parent
870b2642
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
web.py
cps/web.py
+3
-3
No files found.
cps/web.py
View file @
05139e53
...
...
@@ -37,7 +37,7 @@ from flask import session as flask_session
from
flask_babel
import
gettext
as
_
from
flask_login
import
login_user
,
logout_user
,
login_required
,
current_user
from
sqlalchemy.exc
import
IntegrityError
,
InvalidRequestError
,
OperationalError
from
sqlalchemy.sql.expression
import
text
,
func
,
false
,
not_
,
and_
from
sqlalchemy.sql.expression
import
text
,
func
,
false
,
not_
,
and_
,
or_
from
sqlalchemy.orm.attributes
import
flag_modified
from
sqlalchemy.sql.functions
import
coalesce
...
...
@@ -1126,8 +1126,8 @@ def render_adv_search_results(term, offset=None, order=None, limit=None):
q
=
q
.
filter
(
db
.
Books
.
series
.
any
(
db
.
Series
.
id
==
serie
))
for
serie
in
exclude_series_inputs
:
q
=
q
.
filter
(
not_
(
db
.
Books
.
series
.
any
(
db
.
Series
.
id
==
serie
)))
q
=
q
.
join
(
ub
.
BookShelf
,
db
.
Books
.
id
==
ub
.
BookShelf
.
book_id
,
isouter
=
True
)
\
.
filter
(
ub
.
BookShelf
.
shelf
.
notin_
(
exclude_shelf_inputs
))
q
=
q
.
outerjoin
(
ub
.
BookShelf
,
db
.
Books
.
id
==
ub
.
BookShelf
.
book_id
)
\
.
filter
(
or_
(
ub
.
BookShelf
.
shelf
==
None
,
ub
.
BookShelf
.
shelf
.
notin_
(
exclude_shelf_inputs
)
))
if
len
(
include_shelf_inputs
)
>
0
:
q
=
q
.
filter
(
ub
.
BookShelf
.
shelf
.
in_
(
include_shelf_inputs
))
for
extension
in
include_extension_inputs
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment