Compare commits
No commits in common. "b99264647d5ad7e27440a108fadf9bc509ca5873" and "d2ca7db7aa68508b476c281d77544f14490041d8" have entirely different histories.
b99264647d
...
d2ca7db7aa
|
@ -105,10 +105,3 @@ class Rating(models.Model):
|
||||||
fields=("submission", "juror"), name="unique_rating"
|
fields=("submission", "juror"), name="unique_rating"
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class Assignee(models.Model):
|
|
||||||
submission = models.OneToOneField("submission.Submission", on_delete=models.CASCADE)
|
|
||||||
user = models.ForeignKey(
|
|
||||||
"person.User", on_delete=models.CASCADE, related_name="assigned_submissions"
|
|
||||||
)
|
|
||||||
|
|
|
@ -1,26 +1,9 @@
|
||||||
from django.dispatch import receiver
|
from django.dispatch import receiver
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from pretalx.mail.placeholders import SimpleFunctionalMailTextPlaceholder
|
|
||||||
from pretalx.mail.signals import register_mail_placeholders
|
|
||||||
from pretalx.orga.signals import nav_event, nav_event_settings
|
from pretalx.orga.signals import nav_event, nav_event_settings
|
||||||
|
|
||||||
|
|
||||||
@receiver(register_mail_placeholders)
|
|
||||||
def pretalx_musicrate_placeholders(sender, **kwargs):
|
|
||||||
return [
|
|
||||||
SimpleFunctionalMailTextPlaceholder(
|
|
||||||
"assignee",
|
|
||||||
["submission"],
|
|
||||||
lambda submission: assignee.user.name
|
|
||||||
if (assignee := submission.assignee) is not None
|
|
||||||
else "Günther",
|
|
||||||
"Günther",
|
|
||||||
_("The name of the submission's assignee"),
|
|
||||||
)
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
@receiver(nav_event)
|
@receiver(nav_event)
|
||||||
def pretalx_musicrate_qrcode(sender, request, **kwargs):
|
def pretalx_musicrate_qrcode(sender, request, **kwargs):
|
||||||
if not request.user.has_perm("orga.view_submissions", request.event):
|
if not request.user.has_perm("orga.view_submissions", request.event):
|
||||||
|
|
Loading…
Reference in New Issue