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
Johannes Tomren Røsvik
Agreelance
Commits
81cc330d
Commit
81cc330d
authored
Apr 12, 2020
by
dennisjl
Browse files
removed unsed variable in views.py
parent
6fb4aae9
Pipeline
#79917
passed with stage
in 1 minute and 17 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
projects/views.py
View file @
81cc330d
...
...
@@ -139,7 +139,6 @@ def upload_file_to_task(request, project_id, task_id):
task_file
.
task
=
task
existing_file
=
task
.
files
.
filter
(
file
=
directory_path
(
task_file
,
task_file
.
file
.
file
)).
first
()
access
=
user_permissions
[
'modify'
]
or
user_permissions
[
'owner'
]
access_to_file
=
False
# Initialize access_to_file to false
for
team
in
request
.
user
.
profile
.
teams
.
all
():
file_modify_access
=
TaskFileTeam
.
objects
.
filter
(
team
=
team
,
file
=
existing_file
,
modify
=
True
).
exists
()
print
(
file_modify_access
)
...
...
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