mirror of
https://github.com/etnguyen03/tjdests.git
synced 2025-04-21 02:00:16 -04:00
parent
16f503edb8
commit
21df376be4
|
@ -73,9 +73,14 @@ class DecisionForm(forms.ModelForm):
|
|||
raise ValidationError("You cannot add a second entry for this college")
|
||||
|
||||
# Rolling and RD decisions cannot be deferred
|
||||
if cleaned_data.get("decision_type") in [Decision.REGULAR_DECISION, Decision.ROLLING]:
|
||||
if "DEFER" in cleaned_data.get("admission_status"):
|
||||
raise ValidationError("Regular Decision and Rolling decisions cannot result in a deferral")
|
||||
if cleaned_data.get("decision_type") in [
|
||||
Decision.REGULAR_DECISION,
|
||||
Decision.ROLLING,
|
||||
]:
|
||||
if "DEFER" in cleaned_data.get("admission_status", ""):
|
||||
raise ValidationError(
|
||||
"Regular Decision and Rolling decisions cannot result in a deferral"
|
||||
)
|
||||
|
||||
return cleaned_data
|
||||
|
||||
|
|
|
@ -448,7 +448,12 @@ class ProfileTest(TJDestsTestCase):
|
|||
},
|
||||
)
|
||||
self.assertEqual(302, response.status_code)
|
||||
self.assertEqual(1, Decision.objects.filter(college=college, user=user, admission_status=Decision.WAITLIST).count())
|
||||
self.assertEqual(
|
||||
1,
|
||||
Decision.objects.filter(
|
||||
college=college, user=user, admission_status=Decision.WAITLIST
|
||||
).count(),
|
||||
)
|
||||
|
||||
def test_decision_update(self):
|
||||
user = self.login(make_senior=True, make_student=True, accept_tos=True)
|
||||
|
|
Loading…
Reference in New Issue
Block a user