Permalink
Browse files

DoesNotExist exception being called on string representation of model…

… instance of model object
  • Loading branch information...
1 parent aebe52f commit 2282e3fabf1678a9942191bdaaa1a36c7820a0ef Danny Han committed Aug 27, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 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)

0 comments on commit 2282e3f

Please sign in to comment.