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
8726f8d6
Verified
Commit
8726f8d6
authored
Dec 16, 2018
by
Sébastiaan Versteeg
Browse files
Save event first before creating notifications when adding
parent
394ac9c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/events/models.py
View file @
8726f8d6
...
...
@@ -295,6 +295,9 @@ class Event(models.Model, metaclass=ModelTranslateMeta):
return
reverse
(
'events:event'
,
args
=
[
str
(
self
.
pk
)])
def
save
(
self
,
*
args
,
**
kwargs
):
if
not
self
.
pk
:
super
().
save
(
*
args
,
**
kwargs
)
if
self
.
published
:
if
self
.
registration_required
:
registration_reminder_time
=
(
self
.
registration_start
-
...
...
@@ -361,7 +364,7 @@ class Event(models.Model, metaclass=ModelTranslateMeta):
and
not
self
.
start_reminder
.
sent
):
self
.
start_reminder
.
delete
()
super
().
save
(
*
args
,
**
kwargs
)
super
().
save
()
def
__str__
(
self
):
return
'{}: {}'
.
format
(
...
...
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