Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
web app
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
ICNML
web app
Commits
08347fe7
Commit
08347fe7
authored
4 years ago
by
Marco De Donno
Browse files
Options
Downloads
Patches
Plain Diff
Only get the donor informations if we load the target segment page as admin
parent
46a7bc91
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
views/afis/__init__.py
+18
-12
18 additions, 12 deletions
views/afis/__init__.py
with
18 additions
and
12 deletions
views/afis/__init__.py
+
18
−
12
View file @
08347fe7
...
@@ -85,18 +85,24 @@ def show_folder_inner( uuid, admin ):
...
@@ -85,18 +85,24 @@ def show_folder_inner( uuid, admin ):
"""
"""
annotation_list
=
config
.
db
.
query_fetchall
(
sql
,
(
uuid
,
)
)
annotation_list
=
config
.
db
.
query_fetchall
(
sql
,
(
uuid
,
)
)
sql
=
"""
if
admin
:
SELECT
sql
=
"""
submissions.uuid,
SELECT
cnm_folder.pc,
submissions.uuid,
users.username
cnm_folder.pc,
FROM cnm_folder
users.username
INNER JOIN submissions ON cnm_folder.donor_id = submissions.donor_id
FROM cnm_folder
INNER JOIN users ON cnm_folder.donor_id = users.id
INNER JOIN submissions ON cnm_folder.donor_id = submissions.donor_id
WHERE cnm_folder.folder_uuid = %s
INNER JOIN users ON cnm_folder.donor_id = users.id
"""
WHERE cnm_folder.folder_uuid = %s
submission_id
,
pc
,
username
=
config
.
db
.
query_fetchone
(
sql
,
(
uuid
,
)
)
"""
finger_name
=
"
{} (F{})
"
.
format
(
segments_position_code
[
pc
],
pc
)
submission_id
,
pc
,
username
=
config
.
db
.
query_fetchone
(
sql
,
(
uuid
,
)
)
finger_name
=
"
{} (F{})
"
.
format
(
segments_position_code
[
pc
],
pc
)
else
:
submission_id
=
None
finger_name
=
None
username
=
None
return
my_render_template
(
return
my_render_template
(
"
shared/segment.html
"
,
"
shared/segment.html
"
,
...
...
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