+
+ if not self.cleaned_data['picture_image_file']:
+ if self.cleaned_data['picture_image_data']:
+ self.cleaned_data['picture_image_file'] = \
+ ContentFile(b64decode(
+ self.cleaned_data['picture_image_data']))
+ else:
+ raise forms.ValidationError(_("Please supply an image."))
+