Skip to content

Commit

Permalink
fix(requests): do not quickmatch user without profile
Browse files Browse the repository at this point in the history
  • Loading branch information
thejoeejoee committed Sep 18, 2024
1 parent 8c97d9c commit f0d9e9f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fiesta/apps/fiestarequests/forms/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ class Meta:
def clean_matcher(self):
matcher: User = self.cleaned_data["matcher"]

if not matcher.profile_or_none:
raise ValidationError(
_("This user has not completed their profile. Please ask them to do so before matching.")
)

if not matcher.profile_or_none.faculty:
raise ValidationError(_("This user has not set their faculty. Please ask them to do so or do it yourself."))

Expand Down

0 comments on commit f0d9e9f

Please sign in to comment.