Only create GradingRecords for succeful projects or failed projects with Surveys.
This is done because it has no use to create new GradingRecords for already failed/invalid projects because the outcome of this one will have no changing effect on the status.
--- a/app/soc/logic/models/grading_record.py Mon Aug 24 18:44:41 2009 +0200
+++ b/app/soc/logic/models/grading_record.py Mon Aug 24 23:52:48 2009 +0200
@@ -67,6 +67,13 @@
survey_group,
record_entity)
+ if not record_entity and project_entity.status in ['failed', 'invalid'] \
+ and not record_fields['mentor_record'] \
+ and not record_fields['student_record']:
+ # Don't create a new GradingRecord for an already failed project which
+ # has no records attached. Because it does not matter.
+ continue
+
if record_entity:
# update existing GradingRecord
for key,value in record_fields.iteritems():