Commits

Branko Vukelic committed 4688b26

Fixed #3: No longer passing unnecessary arguments

  • Participants
  • Parent commits f8d4718

Comments (0)

Files changed (1)

File related/views.py

         try:
             related_object = self.get_related_object()
         except self.related_model.DoesNotExist:
-            return self.related_object_not_found(self);
+            return self.related_object_not_found();
+
+        if related_object is None:
+            return self.related_object_not_found();
 
         self.object = self.model(**form.cleaned_data)
         setattr(self.object, self.get_related_field(), related_object)