Ignore:
Timestamp:
25 Nov 2011, 13:50:15 (13 years ago)
Author:
Henrik Bettermann
Message:

Redirect to 'full_edit' page after adding student. The 'edit' page cannot be accessed by Application Officers.

Apply Python trick when turning list of lists into single list.

File:
1 edited

Legend:

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

    r7192 r7199  
    509509            applicant.access_code = pin
    510510            self.context[pin] = applicant
    511         self.redirect(self.url(self.context[pin], 'edit'))
     511        self.redirect(self.url(self.context[pin], 'edit_full'))
    512512        return
    513513
     
    779779            return # error during image upload. Ignore other values
    780780        changed_fields = self.applyData(self.context, **data)
    781         changed_fields = changed_fields.values()
    782         fields_string = '+'.join(
    783             ' + '.join(str(i) for i in b) for b in changed_fields)
     781        # Turn list of lists into single list
     782        if changed_fields:
     783            changed_fields = reduce(lambda x,y: x+y, changed_fields.values())
     784        fields_string = ' + '.join(changed_fields)
    784785        if self.passport_changed:
    785786            fields_string += ' + passport'
Note: See TracChangeset for help on using the changeset viewer.