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
thalia
concrexit
Commits
154546b2
Unverified
Commit
154546b2
authored
Apr 02, 2017
by
Thom Wiggers
📐
Browse files
Fix EventAdmin organiser checks
parent
a987c950
Changes
1
Show whitespace changes
Inline
Side-by-side
website/events/admin.py
View file @
154546b2
...
...
@@ -71,10 +71,12 @@ class EventAdmin(DoNextModelAdmin):
def
has_change_permission
(
self
,
request
,
event
=
None
):
try
:
if
not
request
.
user
.
is_superuser
and
event
is
not
None
:
if
(
not
request
.
user
.
is_superuser
and
event
is
not
None
and
event
.
organiser
is
not
None
):
committees
=
request
.
user
.
member
.
get_committees
().
filter
(
Q
(
pk
=
event
.
organiser
.
pk
)).
count
()
return
committees
>
0
if
committees
==
0
:
return
False
except
Member
.
DoesNotExist
:
pass
return
super
().
has_change_permission
(
request
,
event
)
...
...
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