Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
concrexit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
thalia
concrexit
Commits
791fd15f
Commit
791fd15f
authored
4 years ago
by
Mario Tsatsev
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix/newsletter-notification' into 'master'
Fix users set to newsletter push notification See merge request
!1530
parents
3906eee9
713579a6
No related branches found
Branches containing commit
No related tags found
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
website/newsletters/services.py
+5
-2
5 additions, 2 deletions
website/newsletters/services.py
with
5 additions
and
2 deletions
website/newsletters/services.py
+
5
−
2
View file @
791fd15f
...
...
@@ -5,6 +5,7 @@ from django.template.loader import get_template
from
django.utils
import
translation
,
timezone
from
events.models
import
Event
from
members.models
import
Member
from
newsletters
import
emails
from
partners.models
import
Partner
from
pushnotifications.models
import
Message
,
Category
...
...
@@ -67,11 +68,13 @@ def send_newsletter(newsletter):
emails
.
send_newsletter
(
newsletter
)
newsletter
.
sent
=
True
newsletter
.
save
()
Message
.
objects
.
create
(
message
=
Message
.
objects
.
create
(
title_nl
=
newsletter
.
title_nl
,
title_en
=
newsletter
.
title_en
,
body_nl
=
"
Tik om te bekijken
"
,
body_en
=
"
Tap to view
"
,
url
=
settings
.
BASE_URL
+
newsletter
.
get_absolute_url
(),
category
=
Category
.
objects
.
get
(
key
=
Category
.
NEWSLETTER
),
).
send
()
)
message
.
users
.
set
(
Member
.
current_members
.
all
())
message
.
send
()
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