Ignore:
Timestamp:
2 Oct 2011, 06:57:13 (13 years ago)
Author:
Henrik Bettermann
Message:

Fix errors reported by tests.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/batching.py

    r6837 r6841  
    3131    location_fields = ['student_id',]
    3232    factory_name = 'waeup.Student'
     33
     34    mode = None
    3335
    3436    @property
     
    8284    factory_name = 'waeup.StudentStudyCourse'
    8385
     86    mode = None
     87
    8488    @property
    8589    def available_fields(self):
  • main/waeup.sirp/trunk/src/waeup/sirp/students/student.py

    r6839 r6841  
    122122    """
    123123    comment = 'Student record removed'
    124     user = get_current_principal().id
    125124    target = student.student_id
     125    # In some tests we don't have a principal
     126    try:
     127        user = get_current_principal().id
     128    except (TypeError, AttributeError):
     129        return
    126130    grok.getSite()['students'].logger.info('%s - %s - %s' % (
    127131        user, target, comment))
Note: See TracChangeset for help on using the changeset viewer.