Changeset 15779 for main/waeup.kofa/trunk/src/waeup/kofa/hostels/hostel.py
- Timestamp:
- 8 Nov 2019, 05:22:32 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/hostels/hostel.py
r15757 r15779 345 345 if 'bed_id' not in cat.keys(): 346 346 nothing_to_do = False 347 # replace original `updateIndex` method 348 def updateIndexReplacement(index): 349 reindex_cat(cat) 350 cat._updateIndex = cat.updateIndex 351 cat.updateIndex = updateIndexReplacement 352 # setup catalog 353 cat[u'bed_id'] = FieldIndex(field_name=u'bed_id') 354 cat.updateIndex = cat._updateIndex # undo changes 347 355 logger.info( 348 '%s: bed_id index is missing in beds_catalog. ' 349 'Use waeup.kofa.scripts.add_field_index in debugger ' 350 'to add the field index and reindex the catalog.' 356 '%s: bed_id index added to beds_catalog.' 357 % self.log_prefix) 358 reindex_cat(cat) 359 logger.info( 360 '%s: beds_catalog updated.' 351 361 % self.log_prefix) 352 362 except ComponentLookupError: # in unit tests
Note: See TracChangeset for help on using the changeset viewer.