Changeset 2911 for WAeUP_SRP/base
- Timestamp:
- 10 Dec 2007, 16:24:55 (17 years ago)
- Location:
- WAeUP_SRP/base
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTables.py
r2907 r2911 1452 1452 return 1453 1453 if mt == 'CPS Proxy Folder': 1454 if event_type == "sys_add_object": 1455 return # is handled in modify since we don't have order_id yet 1456 # try: 1457 # self.addRecord(order_id = order_id) 1458 # except ValueError: 1459 # pass 1460 # return 1461 elif event_type == 'sys_del_object': 1462 self.deleteRecord(order_id) 1463 return 1454 return # is handled only for the real object 1455 if event_type == 'sys_del_object': 1456 self.deleteRecord(object.order_id) 1464 1457 if event_type not in ('sys_modify_object'): 1465 1458 return -
WAeUP_SRP/base/skins/waeup_epayment/purgePayments.py
r2884 r2911 56 56 keep_count = 0 57 57 payments_folder = None 58 #set_trace()59 58 count = 0 60 s_payments = {}61 59 commit_after = 50 62 #set_trace()63 60 for payment in payments: 64 61 p_sid = payment.getPath().split('/')[-3] 65 # if not s_payments.has_key(p_sid):66 # s_payments[p_sid] = [payment,]67 # else:68 # s_payments[p_sid] = context.waeup_tool.addtodict(s_payments,p_sid, payment)69 62 if sid != p_sid: 70 63 if count and to_del: … … 72 65 context.waeup_tool.doCommit() 73 66 logger.info("committing %d total %d" % (commit_after,delete_count_student)) 67 msg = "(%d/%d) found %d payments to remove, %d to keep for %s" % (count, 68 delete_count_student % commit_after, 69 len(to_del), 70 student_keep_count, 71 sid) 72 #rwrite( msg) 74 73 delete_count_student += 1 75 msg = "(%d) found %d payments to remove, %d to keep for %s" % (count, 76 len(to_del), 77 student_keep_count, 78 sid) 79 #rwrite( msg) 74 logger.info(msg) 80 75 payments_folder = getattr(getattr(students_folder,sid),'payments',None) 81 logger.info("deleting %s of %s %d" % (' '.join(to_del),sid,delete_count_student))76 msg = "deleted %s of %s" % (' '.join(to_del),sid) 82 77 payments_folder.manage_delObjects(to_del) 83 78 logger.info(msg) … … 86 81 student_keep_count, 87 82 sid, 88 review_state )83 review_state,) 89 84 #rwrite( msg) 90 85 sid = p_sid … … 102 97 "courses_registered", 103 98 "courses_validated", 104 ): 105 if payment.review_state == "opened": 106 #rwrite("%s : %s" % (sid,payment.Title)) 107 delete_count += 1 108 to_del += payment.getId, 109 else: 110 keep_count += 1 111 student_keep_count += 1 99 ): 100 delete_count += 1 101 to_del += payment.getId, 102 # if payment.review_state == "opened": 103 # #rwrite("%s : %s" % (sid,payment.Title)) 104 # delete_count += 1 105 # to_del += payment.getId, 106 # else: 107 # keep_count += 1 108 # student_keep_count += 1 112 109 else: 113 110 keep_count += 1
Note: See TracChangeset for help on using the changeset viewer.