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
422c1893
Commit
422c1893
authored
Sep 24, 2020
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for the fix cover_url
parent
bed1b243
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
editbooks.py
cps/editbooks.py
+9
-8
No files found.
cps/editbooks.py
View file @
422c1893
...
...
@@ -613,14 +613,15 @@ def edit_book(book_id):
if
not
error
:
if
"cover_url"
in
to_save
:
if
not
current_user
.
role_upload
()
and
to_save
[
"cover_url"
]
!=
""
:
return
""
,
(
403
)
result
,
error
=
helper
.
save_cover_from_url
(
to_save
[
"cover_url"
],
book
.
path
)
if
result
is
True
:
book
.
has_cover
=
1
modif_date
=
True
else
:
flash
(
error
,
category
=
"error"
)
if
to_save
[
"cover_url"
]:
if
not
current_user
.
role_upload
():
return
""
,
(
403
)
result
,
error
=
helper
.
save_cover_from_url
(
to_save
[
"cover_url"
],
book
.
path
)
if
result
is
True
:
book
.
has_cover
=
1
modif_date
=
True
else
:
flash
(
error
,
category
=
"error"
)
# Add default series_index to book
modif_date
|=
edit_book_series_index
(
to_save
[
"series_index"
],
book
)
...
...
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