AttributeError: 'NoneType' object has no attribute 'get_custom_field_value'
ERROR 2022-03-24 15:03:59,468 log 1645010 140420367714112 Internal Server Error: /mail_templates/10/generate/18
Traceback (most recent call last):
File "/usr/lib/smasch/env/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/lib/smasch/env/lib/python3.8/site-packages/django/core/handlers/base.py", line 179, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/smasch/web/views/mails.py", line 114, in generate
stream = mail_template.apply(instance, request.user, stream)
File "/usr/lib/smasch/web/models/mail_template.py", line 213, in apply
replacements.update(self.get_subject_replacements(study_subject))
File "/usr/lib/smasch/web/models/mail_template.py", line 325, in get_subject_replacements
result[get_field_id(field)] = study_subject.get_custom_field_value(field.name)
AttributeError: 'NoneType' object has no attribute 'get_custom_field_value'
ERROR 2022-03-24 15:05:15,912 view_utils 1645010 140420367714112 When handling GET request for url '/mail_templates/10/generate/18' exception occurred
Traceback (most recent call last):
File "/usr/lib/smasch/env/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/lib/smasch/env/lib/python3.8/site-packages/django/core/handlers/base.py", line 179, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/smasch/web/views/mails.py", line 114, in generate
stream = mail_template.apply(instance, request.user, stream)
File "/usr/lib/smasch/web/models/mail_template.py", line 213, in apply
replacements.update(self.get_subject_replacements(study_subject))
File "/usr/lib/smasch/web/models/mail_template.py", line 325, in get_subject_replacements
result[get_field_id(field)] = study_subject.get_custom_field_value(field.name)
AttributeError: 'NoneType' object has no attribute 'get_custom_field_value'
ERROR 2022-03-24 15:05:15,914 log 1645010 140420367714112 Internal Server Error: /mail_templates/10/generate/18
Traceback (most recent call last):
File "/usr/lib/smasch/env/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/lib/smasch/env/lib/python3.8/site-packages/django/core/handlers/base.py", line 179, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/smasch/web/views/mails.py", line 114, in generate
stream = mail_template.apply(instance, request.user, stream)
File "/usr/lib/smasch/web/models/mail_template.py", line 213, in apply
replacements.update(self.get_subject_replacements(study_subject))
File "/usr/lib/smasch/web/models/mail_template.py", line 325, in get_subject_replacements
result[get_field_id(field)] = study_subject.get_custom_field_value(field.name)
AttributeError: 'NoneType' object has no attribute 'get_custom_field_value'