summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
bd8ed9e)
points = int(request.POST['points'])
# We should check if the user has enough reputation points, otherwise we raise an exception.
points = int(request.POST['points'])
# We should check if the user has enough reputation points, otherwise we raise an exception.
+ if points < 0:
+ raise CommandException(_("The number of points to award needs to be a positive value."))
+
if user.reputation < points:
raise NotEnoughRepPointsException(_("award"))
if user.reputation < points:
raise NotEnoughRepPointsException(_("award"))