mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-25 17:33:08 +01:00
Merge pull request #322 from atmaniak/master
Fix exception for templetags
This commit is contained in:
commit
1ff45f4e1b
@ -9,13 +9,13 @@ from django.template import Library
|
||||
from helpdesk import settings as helpdesk_settings_config
|
||||
|
||||
def load_helpdesk_settings(request):
|
||||
# try:
|
||||
try:
|
||||
return helpdesk_settings_config
|
||||
# except Exception, e:
|
||||
# import sys
|
||||
# print >> sys.stderr, "'load_helpdesk_settings' template tag (django-helpdesk) crashed with following error:"
|
||||
# print >> sys.stderr, e
|
||||
# return ''
|
||||
except Exception as e:
|
||||
import sys
|
||||
print >> sys.stderr, "'load_helpdesk_settings' template tag (django-helpdesk) crashed with following error:"
|
||||
print >> sys.stderr, e
|
||||
return ''
|
||||
|
||||
register = Library()
|
||||
register.filter('load_helpdesk_settings', load_helpdesk_settings)
|
||||
|
@ -12,14 +12,14 @@ from helpdesk.models import SavedSearch
|
||||
|
||||
|
||||
def saved_queries(user):
|
||||
# try:
|
||||
try:
|
||||
user_saved_queries = SavedSearch.objects.filter(Q(user=user) | Q(shared__exact=True))
|
||||
return user_saved_queries
|
||||
# except Exception, e:
|
||||
# import sys
|
||||
# print >> sys.stderr, "'saved_queries' template tag (django-helpdesk) crashed with following error:"
|
||||
# print >> sys.stderr, e
|
||||
# return ''
|
||||
except Exception as e:
|
||||
import sys
|
||||
print >> sys.stderr, "'saved_queries' template tag (django-helpdesk) crashed with following error:"
|
||||
print >> sys.stderr, e
|
||||
return ''
|
||||
|
||||
register = Library()
|
||||
register.filter('saved_queries', saved_queries)
|
||||
|
Loading…
Reference in New Issue
Block a user