Skip to content

Commit 2406d13

Browse files
rantamatti-lamppu
authored andcommitted
Remove ApplicationSectionStatusChoice FAILED and RESERVED statuses
1 parent e0c0d11 commit 2406d13

5 files changed

Lines changed: 0 additions & 23 deletions

File tree

applications/admin/forms/application_section.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,11 @@ class ApplicationSectionAdminForm(forms.ModelForm):
2929
"%(in_allocation)s: Application round has closed, but the section is not fully allocated. <br>"
3030
"%(handled)s: Application round is no longer in allocation, section's applied reservations "
3131
"per week has been fulfilled, or all reservation unit options rejected or locked. <br>"
32-
"%(failed)s: At least one reservation was not possible for some allocation. <br>"
33-
"%(reserved)s: All allocations have successful reservations. <br>"
3432
)
3533
% {
3634
"unallocated": ApplicationSectionStatusChoice.UNALLOCATED.label,
3735
"in_allocation": ApplicationSectionStatusChoice.IN_ALLOCATION.label,
3836
"handled": ApplicationSectionStatusChoice.HANDLED.label,
39-
"failed": ApplicationSectionStatusChoice.FAILED.label,
40-
"reserved": ApplicationSectionStatusChoice.RESERVED.label,
4137
},
4238
)
4339

applications/choices.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,6 @@ class ApplicationSectionStatusChoice(models.TextChoices):
252252
HANDLED = "HANDLED", _("Handled")
253253
"""Application section has been handled fully in the allocation process"""
254254

255-
RESERVED = "RESERVED", _("Reserved")
256-
"""All reservations for the application section have been created successfully"""
257-
258-
FAILED = "FAILED", _("Failed")
259-
"""Some or all reservations for the application section could not be created successfully"""
260-
261255
@DynamicClassAttribute
262256
def can_allocate(self) -> bool:
263257
return self in [

applications/models/application_section.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,6 @@ def status_sort_order() -> int:
251251
models.Q(L(status=ApplicationSectionStatusChoice.HANDLED.value)),
252252
then=models.Value(3),
253253
),
254-
models.When(
255-
models.Q(L(status=ApplicationSectionStatusChoice.FAILED.value)),
256-
then=models.Value(4),
257-
),
258-
models.When(
259-
models.Q(L(status=ApplicationSectionStatusChoice.RESERVED.value)),
260-
then=models.Value(5),
261-
),
262254
default=models.Value(6),
263255
output_field=models.IntegerField(),
264256
)

tests/test_factories/test_application_section.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
ApplicationSectionStatusChoice.UNALLOCATED,
1616
ApplicationSectionStatusChoice.IN_ALLOCATION,
1717
ApplicationSectionStatusChoice.HANDLED,
18-
# TODO: ApplicationSectionStatusChoice.RESERVED,
19-
# TODO: ApplicationSectionStatusChoice.FAILED,
2018
],
2119
)
2220
def test_application_section_factory_create_in_status(status):

tests/test_graphql_api/test_application_section/test_delete.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
[
1717
ApplicationSectionStatusChoice.IN_ALLOCATION,
1818
ApplicationSectionStatusChoice.HANDLED,
19-
# TODO: Later when the feature is implemented:
20-
# ApplicationSectionStatusChoice.RESERVED,
21-
# ApplicationSectionStatusChoice.FAILED,
2219
],
2320
)
2421
def test_cannot_delete_application_event_not_unallocated(graphql, status):

0 commit comments

Comments
 (0)