Closed torgeirl closed 5 months ago
Implemented in 2887ff5
Delivery is uploaded, but the student gets a HTTP 500 and doesn't receive their "delivery receipt" comfirmation email:
AttributeError: 'ForwardManyToOneDescriptor' object has no attribute 'group'
File "django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "cradmin_legacy/crapp.py", line 86, in viewwrapper
return has_access_to_cradmin_instance(cradminview(view))(request, *args, **kwargs)
File "cradmin_legacy/decorators.py", line 32, in wrapper
return view_function(request, *args, **kwargs)
File "cradmin_legacy/decorators.py", line 70, in wrapper
response = view_function(request, *args, **kwargs)
File "django/utils/decorators.py", line 134, in _wrapper_view
response = view_func(request, *args, **kwargs)
File "django/views/generic/base.py", line 104, in view
return self.dispatch(request, *args, **kwargs)
File "django/views/generic/base.py", line 143, in dispatch
return handler(request, *args, **kwargs)
File "devilry/devilry_group/views/cradmin_feedbackfeed_base.py", line 144, in post
return super(FeedbackFeedBaseView, self).post(request=request, *args, **kwargs)
File "django/views/generic/edit.py", line 184, in post
return super().post(request, *args, **kwargs)
File "django/views/generic/edit.py", line 153, in post
return self.form_valid(form)
File "cradmin_legacy/viewhelpers/crudbase.py", line 235, in form_valid
self.object = self.save_object(form)
File "devilry/devilry_group/views/student/feedbackfeed_student.py", line 65, in save_object
return super(StudentFeedbackFeedView, self).save_object(form, commit=True)
File "devilry/devilry_group/views/cradmin_feedbackfeed_base.py", line 524, in save_object
self.perform_after_save(comment=groupcomment)
File "devilry/devilry_group/views/student/feedbackfeed_student.py", line 68, in perform_after_save
self.__send_comment_email(comment=comment)
File "devilry/devilry_group/views/student/feedbackfeed_student.py", line 56, in __send_comment_email
before_original_deadline = self.model.feedback_set.group.parentnode.first_deadline > timezone.now()
Solved with 352301b.
As discussed in #1052, examiners receive too many notifications. And until we have time to address the issue fully we should at least add a partial fix: