Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Paweljong
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Teckids
Projekt Hack-n-Fun
AlekSIS-App-Paweljong
Commits
6bf1b552
Verified
Commit
6bf1b552
authored
2 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Patches
Plain Diff
Allow sending info mailings to retracted or only checked-in people
parent
43ed8dcb
No related branches found
No related tags found
1 merge request
!34
Allow sending info mailings to retracted or only checked-in people
Pipeline
#78349
failed
2 years ago
Stage: prepare
Stage: test
Stage: build
Stage: publish
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/paweljong/models.py
+10
-1
10 additions, 1 deletion
aleksis/apps/paweljong/models.py
with
10 additions
and
1 deletion
aleksis/apps/paweljong/models.py
+
10
−
1
View file @
6bf1b552
...
...
@@ -51,6 +51,9 @@ class InfoMailing(ExtensibleModel):
sender
=
models
.
EmailField
(
verbose_name
=
_
(
"
Sender
"
),
blank
=
True
)
send_to_person
=
models
.
BooleanField
(
verbose_name
=
_
(
"
Send to registered person
"
),
default
=
True
)
send_to_guardians
=
models
.
BooleanField
(
verbose_name
=
_
(
"
Send to guardians
"
),
default
=
False
)
send_to_retracted
=
models
.
BooleanField
(
verbose_name
=
_
(
"
Send to participants who retracted
"
),
default
=
False
)
send_to_not_checked_in
=
models
.
BooleanField
(
verbose_name
=
_
(
"
Send to participants who did not check in
"
),
default
=
True
)
def
__str__
(
self
)
->
str
:
return
self
.
subject
...
...
@@ -64,7 +67,13 @@ class InfoMailing(ExtensibleModel):
through
=
EventInfoMailingThrough
.
objects
.
get
(
info_mailing
=
self
,
event
=
event
)
sent_to
=
through
.
sent_to
.
all
()
for
registration
in
event
.
registrations
.
filter
(
retracted
=
False
):
filter_args
=
{}
if
not
self
.
send_to_retracted
:
filter_args
[
"
retracted
"
]
=
False
if
not
self
.
send_to_not_checked_in
:
filter_args
[
"
checked_in
"
]
=
True
for
registration
in
event
.
registrations
.
filter
(
**
filter_args
):
if
registration
.
person
in
sent_to
:
continue
...
...
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