forked from CGM_Public/pretix_original
forms: fix bound data retrieval of CachedFile
when re-submitting a form a second time, the cached file got lost
This commit is contained in:
committed by
Raphael Michel
parent
5fe5b82f1a
commit
0e73611f7c
@@ -270,6 +270,9 @@ class CachedFileField(ExtFileField):
|
|||||||
cf.save()
|
cf.save()
|
||||||
data._uploaded_to = cf
|
data._uploaded_to = cf
|
||||||
return cf
|
return cf
|
||||||
|
if isinstance(data, CachedFile):
|
||||||
|
return data
|
||||||
|
|
||||||
return super().bound_data(data, initial)
|
return super().bound_data(data, initial)
|
||||||
|
|
||||||
def clean(self, *args, **kwargs):
|
def clean(self, *args, **kwargs):
|
||||||
|
|||||||
Reference in New Issue
Block a user