Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Lynchburg Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lynchburg
Lynchburg Server
Commits
4c7b9e63
Commit
4c7b9e63
authored
4 years ago
by
Nils G.
Browse files
Options
Downloads
Patches
Plain Diff
Return tuple of None in COOKIE_GET
parent
1893efbd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/cookie_util.py
+4
-4
4 additions, 4 deletions
modules/cookie_util.py
with
4 additions
and
4 deletions
modules/cookie_util.py
+
4
−
4
View file @
4c7b9e63
...
...
@@ -11,14 +11,14 @@ def COOKIE_GET():
cookies
=
current
.
request
.
cookies
if
not
"
lynchburg_id
"
in
cookies
or
not
"
lynchburg_hash
"
in
cookies
:
return
(
None
)
return
(
(
None
,
None
)
)
user_id
=
cookies
[
"
lynchburg_id
"
].
value
user_hash
=
cookies
[
"
lynchburg_hash
"
].
value
if
not
user_id
.
isdigit
():
COOKIE_DELETE
()
return
(
None
)
return
(
(
None
,
None
)
)
user_id
=
int
(
user_id
)
...
...
@@ -26,13 +26,13 @@ def COOKIE_GET():
if
not
player_record
:
COOKIE_DELETE
()
return
(
None
)
return
(
(
None
,
None
)
)
room_record
=
current
.
db
(
current
.
db
.
Room
.
id
==
player_record
.
room_id
).
select
().
first
()
if
not
room_record
:
COOKIE_DELETE
()
return
(
None
)
return
(
(
None
,
None
)
)
return
((
player_record
,
room_record
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment