sometimes saving daily planning doesn't work
In such cases it should report that there was an error. And the error should be fixed
ROR 2017-10-11 13:19:34,976 exception 20033 140022577592064 Internal Server Error: /appointments/edit/27872
Traceback (most recent call last):
File "/var/www/scheduling-system/env/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 42, in inner
response = get_response(request)
File "/var/www/scheduling-system/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/var/www/scheduling-system/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/var/www/scheduling-system/smash/web/views/appointment.py", line 84, in appointment_edit
subject = Subject.objects.get(id=the_appointment.visit.subject.id)
AttributeError: 'NoneType' object has no attribute 'subject'
ERROR 2017-10-11 13:44:02,461 exception 20033 140022577592064 Internal Server Error: /appointments/edit/27872
Traceback (most recent call last):
File "/var/www/scheduling-system/env/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 42, in inner
response = get_response(request)
File "/var/www/scheduling-system/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/var/www/scheduling-system/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/var/www/scheduling-system/smash/web/views/appointment.py", line 84, in appointment_edit
subject = Subject.objects.get(id=the_appointment.visit.subject.id)
AttributeError: 'NoneType' object has no attribute 'subject'
ERROR 2017-10-11 13:44:18,407 exception 20033 140022577592064 Internal Server Error: /appointments/edit/27872
Traceback (most recent call last):
File "/var/www/scheduling-system/env/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 42, in inner
response = get_response(request)
File "/var/www/scheduling-system/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/var/www/scheduling-system/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/var/www/scheduling-system/smash/web/views/appointment.py", line 84, in appointment_edit
subject = Subject.objects.get(id=the_appointment.visit.subject.id)
AttributeError: 'NoneType' object has no attribute 'subject'