Changeset 1189
- Timestamp:
- 3 Jan 2007, 18:50:45 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Widgets.py
r1188 r1189 384 384 value = datastructure[widget_id].upper() 385 385 err = 0 386 record = datastructure [self.reference]386 record = datastructure.get(self.reference,None) 387 387 if not valid: 388 388 err = 'Invalid String' 389 elif not record :389 elif not record or datastructure.errors: 390 390 err = 0 391 391 else: 392 #import pdb;pdb.set_trace()393 392 found = False 394 393 cvs = [] … … 429 428 results = self.results_import 430 429 err = 0 431 if not valid: 432 value = datastructure[widget_id] 430 widget_id = self.getWidgetId() 431 value = datastructure[widget_id] 432 if not valid or not value: 433 433 err = 'Invalid MatricNo String %s.' % value 434 logger.info('"%s","invalid MatricNo String","%s"' % value) 435 else: 436 widget_id = self.getWidgetId() 437 value = datastructure[widget_id].upper() 434 logger.info('"%s","invalid MatricNo String"' % value) 435 else: 436 value = value.upper() 438 437 datastructure['student'] = None 439 438 while not err: … … 450 449 datastructure['results'] = res 451 450 break 452 453 454 455 456 457 451 if err: 452 datastructure.setError(widget_id, err) 453 else: 454 datamodel = datastructure.getDataModel() 455 datamodel[self.fields[0]] = value 456 return not err 458 457 459 458 InitializeClass(MatricNoWidget)
Note: See TracChangeset for help on using the changeset viewer.