Changeset 1168
- Timestamp:
- 1 Jan 2007, 16:05:02 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r1151 r1168 851 851 format_error = format + ',"%(Error)s"' 852 852 no_certificate = "no certificate %s" % format 853 if student.get('matric_no') == '': 853 matric_no = student.get('matric_no').upper() 854 student['matric_no'] = matric_no 855 if matric_no == '': 854 856 student['Error'] = "Empty matric_no" 855 857 no_import.append( format_error % student) 856 858 continue 857 if student.get('matric_no') in regs:859 if matric_no in regs or self.returning_import(matric_no = matric_no): 858 860 student['Error'] = "Duplicate" 859 861 no_import.append( format_error % student) … … 884 886 em = '%d transactions commited total %s\n' % (tr_count,total) 885 887 transaction.commit() 888 regs = [] 886 889 logger.info(em) 887 890 total += tr_count … … 937 940 no_certificate = "no certificate %s" % format 938 941 course_id = result.get('CosCode') 939 key = result.get('matric_no')+course_id 940 if key == '': 942 matric_no = result.get('matric_no').upper() 943 result['matric_no'] = matric_no 944 key = matric_no+course_id 945 if matric_no == '': 941 946 result['Error'] = "Empty matric_no" 942 947 no_import.append( format_error % result) 943 948 continue 944 if key in regs :949 if key in regs or self.results_import(key = key): 945 950 result['Error'] = "Duplicate" 946 951 no_import.append( format_error % result) … … 979 984 transaction.commit() 980 985 logger.info(em) 986 regs = [] 981 987 total += tr_count 982 988 tr_count = 0
Note: See TracChangeset for help on using the changeset viewer.