Changeset 6842


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

We don't need a studycourse_added handler to update local roles. The certificate attribute is never set when studycourses have just been added.

File:
1 edited

Legend:

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

    r6822 r6842  
    6767StudentStudyCourse = attrs_to_fields(StudentStudyCourse)
    6868
    69 @grok.subscribe(IStudentStudyCourse, grok.IObjectAddedEvent)
    70 def handle_studycourse_added(obj, event):
    71     """When a studycourse is added, update the local roles.
    72     """
    73     cert = getattr(obj, 'certificate', None)
    74     if cert is None:
    75         # cert never set yet, no need to update local roles
    76         return
    77     update_local_roles(obj)
    78     return
     69#@grok.subscribe(IStudentStudyCourse, grok.IObjectAddedEvent)
     70#def handle_studycourse_added(obj, event):
     71#    """When a studycourse is added, update the local roles.
     72#    """
     73#    cert = getattr(obj, 'certificate', None)
     74#    if cert is None:
     75#        # cert never set yet, no need to update local roles.
     76#        return
     77#    update_local_roles(obj)
     78#    return
    7979
    8080@grok.subscribe(IStudentStudyCourse, grok.IObjectModifiedEvent)
Note: See TracChangeset for help on using the changeset viewer.