Changeset 12883 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 25 Apr 2015, 06:13:18 (10 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/batching.py
r9706 r12883 34 34 35 35 class AccessCodeBatchProcessor(BatchProcessor): 36 """A batch processor for IAccessCodeBatch objects. 36 """The Access Code Batch Processor imports containers for access codes. 37 It does not import their content. There is nothing special about this 38 processor. 37 39 """ 38 40 grok.implements(IBatchProcessor) … … 85 87 86 88 class AccessCodeProcessor(BatchProcessor): 87 """A batch processor for IAccessCode objects. 89 """The Access Code Processor imports access codes (ac) into their 90 batches. Localization requires the `representation` of the ac 91 (object id) as well as `batch_prefix` and `batch_num` to find 92 the parent container (the batch). 93 94 Access codes follow a workflow. The `checkConversion` method validates 95 the workflow `state` and `transition` in row. `checkUpdateRequirements` 96 checks if the transition is allowed. This depends on the context. 88 97 """ 89 98 grok.implements(IBatchProcessor) … … 136 145 def addEntry(self, obj, row, site): 137 146 parent = self.getParent(row, site) 138 obj.batch_serial = row['batch_serial']139 obj.random_num = row['random_num']140 147 parent[row['representation']] = obj 141 148 return -
main/waeup.kofa/trunk/src/waeup/kofa/hostels/batching.py
r11891 r12883 27 27 28 28 class HostelProcessor(BatchProcessor): 29 """A batch processor for IHostel objects. 29 """The Hostel Procesor imports hostels, i.e. the container objects of 30 beds. It does not import beds. There is nothing special about this 31 processor. 30 32 """ 31 33 grok.implements(IBatchProcessor) -
main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py
r12882 r12883 296 296 errs, inv_errs, conv_dict = converter.fromStringDict( 297 297 row, self.factory_name, mode=mode) 298 # We cannot import both state and transition. 299 if 'transition' in row and 'state' in row: 300 if row['transition'] not in (IGNORE_MARKER, '') and \ 301 row['state'] not in (IGNORE_MARKER, ''): 302 errs.append(('workflow','not allowed')) 303 return errs, inv_errs, conv_dict 298 304 if 'transition' in row: 299 305 if row['transition'] not in IMPORTABLE_TRANSITIONS:
Note: See TracChangeset for help on using the changeset viewer.