Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #12 from dhan88/master

DoesNotExist being accessed on string representation of model instead of model object
  • Loading branch information...
commit f5d59976da71e2e6ad3e1da22057efeb4df8adfd 2 parents aebe52f + 2282e3f
@justquick authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 native_tags/contrib/generic_content.py
View
5 native_tags/contrib/generic_content.py
@@ -107,8 +107,9 @@ def retrieve_object(model, *args, **kwargs):
"""
if len(args) == 1:
kwargs.update({'pk': args[0]})
+ _model = _get_model(model)
try:
- return _get_model(model)._default_manager.get(**kwargs)
- except model.DoesNotExist:
+ return _model._default_manager.get(**kwargs)
+ except _model.DoesNotExist:
return ''
retrieve_object = function(retrieve_object)
Please sign in to comment.
Something went wrong with that request. Please try again.