Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
django-panik-emissions
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
radiopanik
django-panik-emissions
Commits
36330815
Commit
36330815
authored
Oct 15, 2020
by
fred
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow users with delete_diffusion perm to delete diffusions
parent
9920f560
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
emissions/forms.py
emissions/forms.py
+1
-1
No files found.
emissions/forms.py
View file @
36330815
...
...
@@ -365,7 +365,7 @@ class AbsenceForm(forms.ModelForm):
emission
=
kwargs
.
get
(
'initial'
,
{}).
get
(
'emission'
)
user
=
kwargs
.
get
(
'initial'
,
{}).
get
(
'user'
)
self
.
fields
[
'datetime'
].
widget
.
emission
=
emission
if
user
and
user
.
is_staff
:
if
(
user
and
user
.
has_perm
(
'emissions.delete_diffusion'
))
:
date
=
emission
.
get_next_planned_date
()
self
.
fields
[
'datetime'
].
initial
=
date
self
.
fields
[
'datetime'
].
widget
=
DateTimeWidget
()
...
...
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