feat: add flag to disable reminders for specific rooms
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
70f21264fc
commit
d390bc6c34
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 5.0.4 on 2025-03-14 22:35
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("app", "0012_alter_shift_deleted_alter_shift_start_at"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="room",
|
||||
name="send_reminders",
|
||||
field=models.BooleanField(default=True),
|
||||
),
|
||||
]
|
|
@ -19,6 +19,7 @@ class Room(models.Model):
|
|||
required_helpers = models.IntegerField()
|
||||
meeting_location = models.TextField(default="Infopoint")
|
||||
description = models.TextField(blank=True, default="")
|
||||
send_reminders = models.BooleanField(default=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
|
|
@ -73,6 +73,7 @@ def send_reminders():
|
|||
reminder_sent=False,
|
||||
shift__start_at__lte=timezone.now()
|
||||
+ global_preferences["helper__reminder_time"],
|
||||
shift__room__send_reminders=True,
|
||||
)
|
||||
with transaction.atomic():
|
||||
for reg in regs:
|
||||
|
|
Loading…
Reference in New Issue