mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-29 11:23:16 +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
|
from helpdesk import settings as helpdesk_settings_config
|
||||||
|
|
||||||
def load_helpdesk_settings(request):
|
def load_helpdesk_settings(request):
|
||||||
# try:
|
try:
|
||||||
return helpdesk_settings_config
|
return helpdesk_settings_config
|
||||||
# except Exception, e:
|
except Exception as e:
|
||||||
# import sys
|
import sys
|
||||||
# print >> sys.stderr, "'load_helpdesk_settings' template tag (django-helpdesk) crashed with following error:"
|
print >> sys.stderr, "'load_helpdesk_settings' template tag (django-helpdesk) crashed with following error:"
|
||||||
# print >> sys.stderr, e
|
print >> sys.stderr, e
|
||||||
# return ''
|
return ''
|
||||||
|
|
||||||
register = Library()
|
register = Library()
|
||||||
register.filter('load_helpdesk_settings', load_helpdesk_settings)
|
register.filter('load_helpdesk_settings', load_helpdesk_settings)
|
||||||
|
@ -12,14 +12,14 @@ from helpdesk.models import SavedSearch
|
|||||||
|
|
||||||
|
|
||||||
def saved_queries(user):
|
def saved_queries(user):
|
||||||
# try:
|
try:
|
||||||
user_saved_queries = SavedSearch.objects.filter(Q(user=user) | Q(shared__exact=True))
|
user_saved_queries = SavedSearch.objects.filter(Q(user=user) | Q(shared__exact=True))
|
||||||
return user_saved_queries
|
return user_saved_queries
|
||||||
# except Exception, e:
|
except Exception as e:
|
||||||
# import sys
|
import sys
|
||||||
# print >> sys.stderr, "'saved_queries' template tag (django-helpdesk) crashed with following error:"
|
print >> sys.stderr, "'saved_queries' template tag (django-helpdesk) crashed with following error:"
|
||||||
# print >> sys.stderr, e
|
print >> sys.stderr, e
|
||||||
# return ''
|
return ''
|
||||||
|
|
||||||
register = Library()
|
register = Library()
|
||||||
register.filter('saved_queries', saved_queries)
|
register.filter('saved_queries', saved_queries)
|
||||||
|
Loading…
Reference in New Issue
Block a user