Commits

Anonymous committed 6c350aa

Don't pass through a request object to the form.

  • Participants
  • Parent commits c850974

Comments (0)

Files changed (1)

File repose/views.py

         elif isinstance(data, models.Model):
             if hasattr(self, 'can_view') and not self.can_view(data):
                 raise http.Forbidden(_(u"You may not view all of that data"))
-            form = self.form(instance=data, request=self.request)
+            form = self.form(instance=data)
         elif isinstance(data, dict):
             signals.pre_validate_data.send(sender=self, data=data)
-            form = self.form(data, request=self.request)
+            form = self.form(data)
         else:
             import pdb; pdb.set_trace()
             # not sure what to do here!
                     data[name] = getattr(obj, name)
         # Now replace those that we were passed in.
         data.update(**request.data)
-        form = self.form(data, instance=obj, request=self.request)
+        form = self.form(data, instance=obj)
         with log_action(request.user, obj, CHANGE, form.updated_message):
             self.save_form(form)
         return form
             if not self.can_update(obj):
                 raise http.Forbidden()
         except ObjectDoesNotExist:
-            form = self.form(request.data, request=self.request)
+            form = self.form(request.data)
             with log_action(request.user, form.instance, ADDITION):
                 self.save_form(form)
         else:
-            form = self.form(request.data, instance=obj, request=self.request)
+            form = self.form(request.data, instance=obj)
             with log_action(request.user, obj, CHANGE, form.updated_message):
                 self.save_form(form)
         return form