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:
Mira Weller
2024-02-20 12:52:04 +01:00
committed by Raphael Michel
parent 3129253eef
commit c6fa19d771

View File

@@ -270,6 +270,9 @@ class CachedFileField(ExtFileField):
cf.save()
data._uploaded_to = cf
return cf
if isinstance(data, CachedFile):
return data
return super().bound_data(data, initial)
def clean(self, *args, **kwargs):