forked from CGM_Public/pretix_original
Fix AttributeError when clearing a cropped picture field
This commit is contained in:
@@ -429,7 +429,7 @@ class PortraitImageWidget(UploadedFileWidget):
|
|||||||
|
|
||||||
def value_from_datadict(self, data, files, name):
|
def value_from_datadict(self, data, files, name):
|
||||||
d = super().value_from_datadict(data, files, name)
|
d = super().value_from_datadict(data, files, name)
|
||||||
if d is not None:
|
if d is not None and d is not False:
|
||||||
d._cropdata = json.loads(data.get(name + '_cropdata', '{}') or '{}')
|
d._cropdata = json.loads(data.get(name + '_cropdata', '{}') or '{}')
|
||||||
return d
|
return d
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user