Changeset 2039


Ignore:
Timestamp:
20 Jul 2007, 08:58:54 (17 years ago)
Author:
joachim
Message:

fixed bug in Catalog.py to correctly update keyword index metadata

Location:
WAeUP_SRP/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/WAeUPTables.py

    r2033 r2039  
    550550            if event_type not in ("sys_add_object","sys_del_object"):
    551551                return
    552             #import pdb;pdb.set_trace()
    553552            level_session = getattr(object.aq_parent.getContent(),'session','unknown')
    554553            if level_session not in (self.getSessionId()[-2:],'2006/2007'):
     
    562561                return
    563562            student_rec = res[0]
    564             registered_courses = getattr(student_rec,'registered_courses',[])
    565             try:
    566                 x = course_id in registered_courses
    567             except TypeError:
     563            registered_courses = getattr(student_rec,'registered_courses',None)
     564            if not registered_courses:
    568565                registered_courses = []
     566            #import pdb;pdb.set_trace()
    569567            if event_type == "sys_add_object":
    570568                if course_id not in registered_courses:
     
    572570                else:
    573571                    return
    574             elif event_type == "sys_del_object":
     572            elif registered_courses and event_type == "sys_del_object":
     573                removed = False
    575574                while course_id in registered_courses:
     575                    removed = True
    576576                    registered_courses.remove(course_id)
     577                if not removed:
     578                    return
    577579            data['id'] = student_id
    578580            data['registered_courses'] = registered_courses
  • WAeUP_SRP/trunk/__init__.py

    r2013 r2039  
    2424import PatchFasterSessionData
    2525import PatchQueueCatalogProcessQueue
     26import PatchZCatalogCatalogUpdateMetadata
    2627# Only for CPS 3.4.1. In 3.4.2 and later this should be fixed.
    2728import PatchCPSDefaultImportExport
Note: See TracChangeset for help on using the changeset viewer.