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
d89830af
Commit
d89830af
authored
Aug 24, 2020
by
Ozzie Isaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix anonymous user has no modified_flag error
parent
ef1736b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
web.py
cps/web.py
+12
-3
No files found.
cps/web.py
View file @
d89830af
...
...
@@ -473,7 +473,10 @@ def update_view():
#visibility = json.loads(current_user.view_settings)
current_user
.
view_settings
[
'series_view'
]
=
to_save
[
"series_view"
]
# current_user.view_settings = json.dumps(visibility)
flag_modified
(
current_user
,
"view_settings"
)
try
:
flag_modified
(
current_user
,
"view_settings"
)
except
AttributeError
:
pass
ub
.
session
.
commit
()
except
InvalidRequestError
:
log
.
error
(
"Invalid request received:
%
r "
,
request
,
)
...
...
@@ -626,7 +629,10 @@ def render_books_list(data, sort, book_id, page):
else
:
try
:
current_user
.
view_settings
[
data
]
=
sort
flag_modified
(
current_user
,
"view_settings"
)
try
:
flag_modified
(
current_user
,
"view_settings"
)
except
AttributeError
:
pass
ub
.
session
.
commit
()
except
InvalidRequestError
:
log
.
error
(
"Invalid request received:
%
r "
,
request
,
)
...
...
@@ -1015,7 +1021,10 @@ def update_table_settings():
# ToDo: Save table settings
current_user
.
view_settings
[
'table'
]
=
json
.
loads
(
request
.
data
)
try
:
flag_modified
(
current_user
,
"view_settings"
)
try
:
flag_modified
(
current_user
,
"view_settings"
)
except
AttributeError
:
pass
ub
.
session
.
commit
()
except
InvalidRequestError
:
log
.
error
(
"Invalid request received:
%
r "
,
request
,
)
...
...
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