Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
dab56f09
Commit
dab56f09
authored
Jun 04, 2014
by
Marc Duez
Browse files
server : controller file redirect to the correct page after file deletion
parent
0c9ace0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/web2py/applications/vidjil/controllers/file.py
View file @
dab56f09
...
...
@@ -126,9 +126,12 @@ def delete():
response
.
headers
[
'Access-Control-Allow-Credentials'
]
=
'true'
response
.
headers
[
'Access-Control-Max-Age'
]
=
86400
patient_id
=
db
.
sequence_file
[
request
.
vars
[
"id"
]].
patient_id
db
(
db
.
sequence_file
.
id
==
request
.
vars
[
"id"
]).
delete
()
db
(
db
.
data_file
.
sequence_file_id
==
request
.
vars
[
"id"
]).
delete
()
res
=
{
"redirect"
:
"patient/index"
,
res
=
{
"redirect"
:
"patient/info"
,
"args"
:
{
"id"
:
patient_id
},
"message"
:
"sequence file deleted"
}
return
gluon
.
contrib
.
simplejson
.
dumps
(
res
,
separators
=
(
','
,
':'
))
Write
Preview
Supports
Markdown
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