How "unpythonic" is it for an exception to be the expected outcome?

In Django I am validating a request which submits something that a user is only supposed to submit once, and in the "correct behavour sequence" an Exception is raised:

try:
    my_row = models.MyModel.objects.get(id=instance_id, user=request.logged_in_user)
    return HttpResponseBadRequest("Already submitted")
except models.MyModel.DoesNotExist:
    pass

// continue

Scale of 1-10, how much of a crime is this?

Вернуться на верх