Changeset 2350


Ignore:
Timestamp:
11 Oct 2007, 16:24:46 (17 years ago)
Author:
joachim
Message:

check for correct screening_type, please test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/Widgets.py

    r2346 r2350  
    13381338        """Prepare datastructure from datamodel."""
    13391339        datamodel = datastructure.getDataModel()
     1340        #import pdb;pdb.set_trace()
    13401341        v = datamodel[self.fields[0]]
    13411342        widget_id = self.getWidgetId()
     
    13601361        datastructure[widget_id+'_b'] = b
    13611362        datastructure[widget_id+'_n'] = n
    1362         screening_type = datamodel.get('screening_type',None)
    1363         if screening_type is None:
    1364             screening_type = self.REQUEST.form.get('screening_type','unknown')
     1363        screening_type = self.REQUEST.traverse_subpath[0]
    13651364        datastructure["screening_type"] = screening_type
    13661365    ###)
     
    13731372        err = 0
    13741373        mapping = {}
    1375         #import pdb;pdb.set_trace()
    13761374        prefix= self.prefix
    13771375        if prefix.startswith('@'):
     
    14351433                elif datastructure.has_key('record'):
    14361434                    applicant = datastructure['record']
     1435                    if applicant.screening_type != screening_type:
     1436                        err = "Wrong screening type"
     1437                        s_logger.info('%ref has screening type %s tried to login for %s' % (ref,
     1438                                                                                           applicant.screening_type,
     1439                                                                                           screening_type))
     1440                        break
    14371441                    if not applicant.pin:
    14381442                        s_logger.info('%s successfully used PIN %s' % (ref,pin_str))
Note: See TracChangeset for help on using the changeset viewer.