Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/ortsed/django-cropduster
Browse files Browse the repository at this point in the history
  • Loading branch information
Llewellyn Hinkes committed Nov 27, 2012
2 parents d270e7f + 1b33b0f commit be85253
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cropduster/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def save(self, *args, **kwargs):
self.image.rescale(cropped_image, size=size)
def clean(self):

if not self.crop_x or not self.crop_y:
if not hasattr(self, "crop_x") or not hasattr(self, "crop_y"):
raise ValidationError("Missing crop values")

if self.crop_x < 0 or self.crop_y < 0:
Expand Down

0 comments on commit be85253

Please sign in to comment.