we need to figure out why in this particular case, 'request' is a string.
This commit is contained in:
Andreas Kotowicz 2011-02-06 13:30:04 +01:00
parent b40d4511a3
commit 8ed7debbdf

View File

@ -12,8 +12,13 @@ from helpdesk.models import SavedSearch
def saved_queries(request):
user_saved_queries = SavedSearch.objects.filter(Q(user=request.user) | Q(shared__exact=True))
return user_saved_queries
try:
user_saved_queries = SavedSearch.objects.filter(Q(user=request.user) | Q(shared__exact=True))
return user_saved_queries
except Exception, e:
print "'saved_queries' template tag (django-helpdesk) crashed with following error:"
print e
return ''
register = Library()
register.filter('saved_queries', saved_queries)