We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6042b30 commit 022442cCopy full SHA for 022442c
appointment/models.py
@@ -311,9 +311,9 @@ def __str__(self):
311
def clean(self):
312
if self.start_time is not None and self.end_time is not None:
313
if self.start_time >= self.end_time:
314
- raise ValueError(_("Start time must be before end time"))
+ raise ValidationError(_("Start time must be before end time"))
315
if self.start_time == self.end_time:
316
- raise ValueError(_("Start time and end time cannot be the same"))
+ raise ValidationError(_("Start time and end time cannot be the same"))
317
# Check for valid date
318
try:
319
# This will raise a ValueError if the date is not valid
0 commit comments