Changeset 6375 for main/waeup.sirp/trunk


Ignore:
Timestamp:
15 Jun 2011, 23:51:47 (13 years ago)
Author:
uli
Message:

Remove the faulty transition trigger inserted just before and replace
it by correct one. Please remember that there is no 'start' trigger
for pins (AccessCodes?) and even if there would be one, it could only
be fired for AccessCode? instances and not for strings like
'APP-bla...'. Furthermore it us much shorter to use
invalidate_accesscode().

The removed code even failed tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py

    r6367 r6375  
    422422            return
    423423        pin = self.request.principal.access_code
    424         state = IWorkflowState(self.context[pin]).getState()
    425         if state == INITIALIZED:
    426             IWorkflowInfo(self.context[pin]).fireTransition('start')
     424
     425        # Mark pin as used (this also fires a pin related transition)
     426        invalidate_accesscode(pin)
     427
    427428        if pin in self.context.keys():
    428429            self.redirect(self.url(self.context[pin], 'edit'))
    429430            return
    430 
    431         # Mark pin as used
    432         invalidate_accesscode(pin)
    433431
    434432        # Create applicant record
Note: See TracChangeset for help on using the changeset viewer.