diff -r 8c88226b27e7 -r dd841c3160d8 app/soc/logic/models/grading_record.py --- 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():