Myghty Template Error

Error: Error(TypeError): can't compare datetime.datetime to NoneType
File: /srv/www/dfb/turniere.fechten.org/htdocs/methods/ausschreibung.psp line 16
Context: 13: We = db.Wettbewerb.select(veranstaltung = turnier_id)
14: We.sort(lambda x,y: cmp(x["waffe"]["waffe_id"], y["waffe"]["waffe_id"]))
15: We.sort(lambda x,y: cmp(x["altersklasse"]["altersklasse_id"], y["altersklasse"]["altersklasse_id"]))
16: We.sort(lambda x,y: cmp(x["aufruf"], y["aufruf"]))
17:
18: if language == 'de':
19:   locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8')
Traceback: /srv/www/dfb/turniere.fechten.org/htdocs/methods/ausschreibung.psp:16
/srv/www/dfb/turniere.fechten.org/htdocs/methods/ausschreibung.psp:16
/srv/www/dfb/turniere.fechten.org/htdocs/dhandler:17
/srv/www/dfb/turniere.fechten.org/htdocs/autohandler:2
/srv/www/dfb/turniere.fechten.org/bin/turniere.wsgi:12


Original Stack Trace:

Error: Error(TypeError): can't compare datetime.datetime to NoneType
File: /srv/www/dfb/turniere.fechten.org/myghty/obj/main//methods/ausschreibung.psp.py line 46
Context: 43:               We = db.Wettbewerb.select(veranstaltung = turnier_id)
44:               We.sort(lambda x,y: cmp(x["waffe"]["waffe_id"], y["waffe"]["waffe_id"]))
45:               We.sort(lambda x,y: cmp(x["altersklasse"]["altersklasse_id"], y["altersklasse"]["altersklasse_id"]))
46:               We.sort(lambda x,y: cmp(x["aufruf"], y["aufruf"]))
47:
48:               if language == 'de':
49:                 locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8')
Traceback: /srv/www/dfb/turniere.fechten.org/myghty/obj/main//methods/ausschreibung.psp.py:46
/srv/www/dfb/turniere.fechten.org/myghty/obj/main//methods/ausschreibung.psp.py:46
/usr/lib/python2.5/site-packages/Myghty-1.1.1-py2.5.egg/myghty/component.py:128
/usr/lib/python2.5/site-packages/Myghty-1.1.1-py2.5.egg/myghty/request.py:389
/usr/lib/python2.5/site-packages/Myghty-1.1.1-py2.5.egg/myghty/request.py:305
/srv/www/dfb/turniere.fechten.org/myghty/obj/main//dhandler.py:45
/usr/lib/python2.5/site-packages/Myghty-1.1.1-py2.5.egg/myghty/component.py:128
/usr/lib/python2.5/site-packages/Myghty-1.1.1-py2.5.egg/myghty/request.py:389
/usr/lib/python2.5/site-packages/Myghty-1.1.1-py2.5.egg/myghty/request.py:300
/usr/lib/python2.5/site-packages/Myghty-1.1.1-py2.5.egg/myghty/request.py:725
/srv/www/dfb/turniere.fechten.org/myghty/obj/main//autohandler.py:36
/usr/lib/python2.5/site-packages/Myghty-1.1.1-py2.5.egg/myghty/component.py:128
/usr/lib/python2.5/site-packages/Myghty-1.1.1-py2.5.egg/myghty/request.py:389
/usr/lib/python2.5/site-packages/Myghty-1.1.1-py2.5.egg/myghty/request.py:250
/usr/lib/python2.5/site-packages/Myghty-1.1.1-py2.5.egg/myghty/exception.py:61
/usr/lib/python2.5/site-packages/Myghty-1.1.1-py2.5.egg/myghty/request.py:270
/usr/lib/python2.5/site-packages/Myghty-1.1.1-py2.5.egg/myghty/http/HTTPHandler.py:138
/usr/lib/python2.5/site-packages/Myghty-1.1.1-py2.5.egg/myghty/http/WSGIHandler.py:60
/srv/www/dfb/turniere.fechten.org/bin/turniere.wsgi:12