Changeset 1921


Ignore:
Timestamp:
18 Jun 2007, 09:28:04 (18 years ago)
Author:
joachim
Message:

reopen application object for loading foto

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/WAeUPTool.py

    r1911 r1921  
    212212    def loadStudentFoto(self,student,filename,folder):
    213213        "return a student passport picture"
    214         app_doc = student.application.getContent()
     214        app = student.application
     215        app_doc = app.getContent()
    215216        #clear = student.clearance
    216217        #clear_doc = clear.getContent()
     
    225226        else:
    226227            return "passport picture not found %s" % picture1
    227 
     228        reopened = False
     229        if self.portal_workflow.getInfoFor(app,'review_state',None) !='opened':
     230            self.portal_workflow.doActionFor(app,'open')
     231            reopened = True
    228232        outfile = file.read()
    229233        app_doc.manage_addFile('passport',
    230234                               file=outfile,
    231235                               title="%s.jpg" % filename)
     236        if reopened:
     237            self.portal_workflow.doActionFor(app,'close')
    232238        return "successfully loaded passport picture"
    233239    ###)
Note: See TracChangeset for help on using the changeset viewer.