Changeset 3404 for WAeUP_SRP/base


Ignore:
Timestamp:
1 Apr 2008, 20:15:01 (16 years ago)
Author:
Henrik Bettermann
Message:

correct logging message

Also jamb_reg_nos must be unique, condtion added.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPImport.py

    r3402 r3404  
    772772                res = self.students_catalog(jamb_reg_no = jamb_reg_no)
    773773                if res:
    774                     msg = "jamb_reg_no exists for student %s" % res[0].id
     774                    msg = "jamb_reg_no already assigned to student %s" % res[0].id
    775775                    break
    776776            if matric_no:
    777777                res = self.students_catalog(matric_no = matric_no)
    778778                if res:
    779                     msg = "matric_no exists for student %s" % res[0].id
     779                    msg = "matric_no already assigned to student %s" % res[0].id
    780780                    break
    781781            if not matric_no and not jamb_reg_no:
     
    846846                        res = self.students_catalog(matric_no = matric_no)
    847847                        if res:
    848                             msg = "matric_no exists for student %s" % res[0].id
     848                            msg = "matric_no already assigned to student %s" % res[0].id
    849849                            break
    850850                        msg = "old matric_no %s overwritten with %s" % (student_record.matric_no,matric_no)
     
    852852                if jamb_reg_no and student_record.jamb_reg_no:
    853853                    if jamb_reg_no != student_record.jamb_reg_no:
    854                         msg = "old reg_no %s overwritten with %s" % (student_record.jamb_reg_no,jamb_reg_no)
     854                        res = self.students_catalog(jamb_reg_no = jamb_reg_no)
     855                        if res:
     856                            msg = "jamb_reg_no already assigned to student %s" % res[0].id
     857                            break                   
     858                        msg = "old jamb_reg_no %s overwritten with %s" % (student_record.jamb_reg_no,jamb_reg_no)
    855859                        #logger.info("%s, old reg_no %s overwritten with %s" % (student_record.id,student_record.jamb_reg_no,jamb_reg_no))
    856860            elif jamb_reg_no:
Note: See TracChangeset for help on using the changeset viewer.