Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clinicaltrials
Project
Project
Details
Activity
Releases
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
david Chavalarias
clinicaltrials
Commits
653ecbdd
Commit
653ecbdd
authored
Feb 23, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor cleanup
parent
3cb3f8c4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
main.py
services/main.py
+4
-3
user.py
services/user.py
+1
-2
No files found.
services/main.py
View file @
653ecbdd
...
...
@@ -532,7 +532,6 @@ def claim_profile():
if
'token'
in
request
.
args
:
return_token
=
sanitize
(
request
.
args
[
'token'
])
print
(
"clean token"
,
return_token
)
if
(
return_token
and
type
(
return_token
)
==
str
...
...
@@ -547,7 +546,7 @@ def claim_profile():
# claim failure cases
if
return_token
is
None
or
luid
is
None
or
return_user
is
None
:
mlog
(
'INFO'
,
'failed claim profile
attempt
with return_token=
%
s, luid=
%
s'
%
(
str
(
return_token
),
str
(
luid
)))
mlog
(
'INFO'
,
'failed claim profile
GET
with return_token=
%
s, luid=
%
s'
%
(
str
(
return_token
),
str
(
luid
)))
return
render_template
(
"message.html"
,
message
=
"""
...
...
@@ -560,7 +559,7 @@ def claim_profile():
# claim success
else
:
mlog
(
'
INFO'
,
"successful claim_profile attempt with
luid ="
,
luid
)
mlog
(
'
DEBUG'
,
"successful claim_profile GET for
luid ="
,
luid
)
# we *don't* log him in but we do put his data as return_user
# => this way we can use templating to show the data
return
render_template
(
...
...
@@ -619,6 +618,8 @@ def claim_profile():
debug_message
=
tools
.
format_err
(
perr
)
)
mlog
(
'DEBUG'
,
"successful claim_profile for luid ="
,
luid
)
return
render_template
(
"message.html"
,
message
=
"Your new login credentials are saved. To complete your registration, just click the link in the confirmation email you should receive."
...
...
services/user.py
View file @
653ecbdd
...
...
@@ -70,7 +70,6 @@ def jsonize_uinfo(uinfo_dict):
if
type
(
v
)
not
in
[
date
,
datetime
]:
raise
TypeError
(
"Incorrect type for
%
s field: /
%
s/ instead of date or datetime"
%
(
k
,
type
(
v
)))
else
:
print
(
"toto"
)
serializable_dict
[
k
]
=
v
.
isoformat
()
# date "YYYY-MM-DD"
# datetime "YYYY-MM-DDTHH:MM:SS"
...
...
@@ -286,7 +285,7 @@ def doors_register(email, password, name, config=REALCONFIG):
# eg doors_response.content = b'{"status":"registration email sent",
# "email":"john@locke.com"}''
answer
=
loads
(
doors_response
.
content
.
decode
())
mlog
(
"INFO"
,
"/api/register answer"
,
answer
)
#
mlog("INFO", "/api/register answer",answer)
return
answer
[
'userID'
]
else
:
return
None
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