mailpipe: fix course -> error.course in InvalidAssignmentSubject handling.
authorW. Trevor King <wking@tremily.us>
Sat, 13 Oct 2012 11:08:49 +0000 (07:08 -0400)
committerW. Trevor King <wking@tremily.us>
Sat, 13 Oct 2012 11:08:49 +0000 (07:08 -0400)
pygrader/mailpipe.py

index 59023207689c372a54cb03ffc066be7746c61f33..be7b1a02c6a51eda8a8f016b7a033f446fa4e82e 100644 (file)
@@ -1095,7 +1095,7 @@ def _get_error_response(error):
             # prefer a submittable example assignment
             assignments = [
                 a for a in error.course.assignments if a.submittable]
             # prefer a submittable example assignment
             assignments = [
                 a for a in error.course.assignments if a.submittable]
-            assignments += course.assignments  # but fall back to any one
+            assignments += error.course.assignments  # but fall back to any one
             hint = (
                 'Remember to use the full name for the assignment in the\n'
                 'subject.  For example:\n'
             hint = (
                 'Remember to use the full name for the assignment in the\n'
                 'subject.  For example:\n'