un1t / django-file-resubmit

It remembers selected files in form on validation errors.
76 stars 39 forks source link

File is saved twice in cache with two different cache keys #29

Open erny opened 4 years ago

erny commented 4 years ago

The widgets.ResubmitBaseWidget.value_from_datadict is called twice, once when validating a form (during a POST) and may be called again when rendering the form if it is invalid.

It would be nice to check if self.cache_key is already set before setting it.

erny commented 4 years ago

Please check PR #30.