Skip to content

Commit

Permalink
Clean up some variables and text
Browse files Browse the repository at this point in the history
Issue #3989
  • Loading branch information
bickelj committed Aug 9, 2024
1 parent c2172ce commit 3865e71
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def handle(self, *args, **options):
== ProjectReminderFrequency.FrequencyRelation.AFTER
else 1
)
delta = frequency.num_days * multiplier
delta = frequency.reminder_days * multiplier

due_date = today + relativedelta(days=delta)
for project in Project.objects.in_progress():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.2.11 on 2024-06-14 14:22
# Generated by Django 4.2.11 on 2024-08-08 20:57

from django.db import migrations, models
import django.db.models.deletion
Expand Down Expand Up @@ -27,7 +27,7 @@ class Migration(migrations.Migration):
"sort_order",
models.IntegerField(blank=True, editable=False, null=True),
),
("num_days", models.IntegerField()),
("reminder_days", models.IntegerField()),
(
"relation",
models.CharField(
Expand Down
10 changes: 5 additions & 5 deletions hypha/apply/projects/models/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ def __str__(self):


class ProjectReminderFrequency(Orderable, ClusterableModel):
num_days = models.IntegerField()
reminder_days = models.IntegerField()
page = ParentalKey("ProjectSettings", related_name="reminder_frequencies")

class FrequencyRelation(models.TextChoices):
Expand All @@ -531,8 +531,8 @@ class FrequencyRelation(models.TextChoices):
)

panels = [
FieldPanel("num_days", heading=_("Number of Days")),
FieldPanel("relation", heading=_("Relation to Project Due Date")),
FieldPanel("reminder_days", heading=_("Number of days")),
FieldPanel("relation", heading=_("Relation to report due date")),
]


Expand Down Expand Up @@ -569,8 +569,8 @@ class ProjectSettings(BaseSiteSetting, ClusterableModel):
),
InlinePanel(
"reminder_frequencies",
label=_("Report Reminder Frequency"),
heading=_("Report Reminder Frequency"),
label=_("Report reminder frequency"),
heading=_("Report reminder frequency"),
),
]

Expand Down
2 changes: 1 addition & 1 deletion hypha/apply/projects/tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def setUpTestData(cls):
cls.project_settings.reminder_frequencies = [
ProjectReminderFrequency.objects.create(
page=cls.project_settings,
num_days=7,
reminder_days=7,
relation=ProjectReminderFrequency.FrequencyRelation.BEFORE,
),
]
Expand Down

0 comments on commit 3865e71

Please sign in to comment.