|
|
@@ -267,6 +267,12 @@ class ProductCreateUpdateView(generic.UpdateView):
|
|
267
|
267
|
if self.creating and form.is_valid():
|
|
268
|
268
|
self.object.delete()
|
|
269
|
269
|
self.object = None
|
|
|
270
|
+ # We currently don't hold on to images if the other formsets didn't
|
|
|
271
|
+ # validate. But as the browser won't re-POST any images, we can do
|
|
|
272
|
+ # no better than re-bind the image formset, which means the user
|
|
|
273
|
+ # will have to re-select the images (see #1126)
|
|
|
274
|
+ image_formset = self.image_formset(instance=self.object)
|
|
|
275
|
+
|
|
270
|
276
|
return self.forms_invalid(
|
|
271
|
277
|
form, stockrecord_formset, category_formset,
|
|
272
|
278
|
image_formset, recommended_formset)
|