def may_not_toggle_submission_reason(user, image): may, reason = may_toggle_submission_image(user, image) return reason
def clean(self): may, reason = may_toggle_submission_image(self.submitter, self.image) if not may: raise ValidationError(reason)
def may_not_toggle_submission_reason(user, image): may, reason = may_toggle_submission_image(user, image) return reason
def clean(self): may, reason = may_toggle_submission_image(self.submitter, self.image) if not may: raise ValidationError(reason)