Changeset 8617 for main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Timestamp:
- 3 Jun 2012, 13:57:01 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/batching.py
r8615 r8617 304 304 cert = conv_dict.get('course1', None) 305 305 if cert is not None and (mode in ('create', 'update')): 306 # course1 application category must match container's. We 307 # could move that check into addApplicant, as it is 308 # expensive. 309 # 310 # XXX: getSite() should be avoided here. 311 parent = self.getParent(row, grok.getSite()) 306 # course1 application category must match container's. 307 parent = self.getParent(row, self.site) 312 308 if cert.application_category != parent.application_category: 313 309 errs.append(('course1', 'wrong application category')) … … 336 332 return 'Applicant is blocked.' 337 333 return None 334 335 def doImport(self, *args, **kw): 336 # XXX: Not thread-safe. Parallel applicant imports into 337 # different sites could mean a mess. Luckily this is not a 338 # typical use-case. On the other hand it spares thousands of 339 # site lookups during large imports. 340 # XXX: Maybe this should go into Importer base. 341 self.site = grok.getSite() # needed by checkConversion() 342 return super(ApplicantProcessor, self).doImport(*args, **kw)
Note: See TracChangeset for help on using the changeset viewer.