Skip to content

Commit

Permalink
Fix DoesNotExist exception in model_object()
Browse files Browse the repository at this point in the history
  • Loading branch information
cachitas committed Mar 8, 2019
1 parent 49349f5 commit 77e4922
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyforms_web/widgets/django/modelform.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def model_object(self):

try:
return queryset.get(pk=self.object_pk)
except self.model.ObjectDoesNotExist:
except self.model.DoesNotExist:
return None

#################################################################################
Expand Down

0 comments on commit 77e4922

Please sign in to comment.