Changeset 1459 for WAeUP_SRP/trunk


Ignore:
Timestamp:
21 Feb 2007, 17:18:32 (18 years ago)
Author:
joachim
Message:

use hasObject

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_utilities/fixLevelFromResults.py

    r1434 r1459  
    6060                                              verdict = "")
    6161        while True:
    62             student = getattr(students,sbrain.id,None)
    6362            ec = "nos"
    64             if student is None:
     63            if not students.hasObject(sbrain.id):
    6564                break
     65            student = getattr(students,sbrain.id)
    6666            ec = "nyr"
    67             study_course = getattr(student,"study_course", None)
    68             if study_course is None:
     67            if not student.hasObject("study_course"):
    6968                break
     69            study_course = getattr(student,"study_course")
    7070            study_course.getContent().edit(mapping = {'current_level':level,
    7171                                                      'current_verdict':verdict})
Note: See TracChangeset for help on using the changeset viewer.