Ignore:
Timestamp:
26 Nov 2011, 16:51:14 (13 years ago)
Author:
Henrik Bettermann
Message:

Catch exception in handle_student_removed when entire university instances are being removed.

File:
1 edited

Legend:

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

    r7203 r7212  
    154154    except (TypeError, AttributeError):
    155155        return
    156     grok.getSite()['students'].logger.info('%s - %s - %s' % (
    157         user, target, comment))
     156    try:
     157        grok.getSite()['students'].logger.info('%s - %s - %s' % (
     158            user, target, comment))
     159    except KeyError:
     160        # If we delete an entire university instance there won't be
     161        # a students subcontainer
     162        return
    158163    return
    159164
Note: See TracChangeset for help on using the changeset viewer.