Ignore:
Timestamp:
15 Apr 2011, 06:03:44 (14 years ago)
Author:
Henrik Bettermann
Message:

The implementation of a workflow for certificates is an interesting case study and should thus be kept in the source code as comment. We don't need a workflow in the academics section.

File:
1 edited

Legend:

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

    r5948 r5949  
    11001100    def addCertificate(self, **data):
    11011101        certificate = createObject(u'waeup.Certificate')
    1102         try:
    1103             self.applyData(certificate, **data)
    1104         except NoTransitionAvailableError:
    1105             self.status = Invalid('Review state cannot be changed to '
    1106                                   'requested state: no such transition '
    1107                                   'available in workflow.')
    1108             return
     1102        self.applyData(certificate, **data)
     1103       
     1104        #try:
     1105        #    self.applyData(certificate, **data)
     1106        #except NoTransitionAvailableError:
     1107        #    self.status = Invalid('Review state cannot be changed to '
     1108        #                          'requested state: no such transition '
     1109        #                          'available in workflow.')
     1110        #    return
     1111       
    11091112        try:
    11101113            self.context.certificates.addCertificate(certificate)
     
    12441247    @grok.action('Save')
    12451248    def save(self, **data):
    1246         try:
    1247             self.applyData(self.context, **data)
    1248         except NoTransitionAvailableError:
    1249             self.status = Invalid('Review state cannot be changed to '
    1250                                   'requested state: no such transition '
    1251                                   'available in workflow.')
    1252         return
     1249        self.applyData(self.context, **data)
     1250       
     1251        #try:
     1252        #    self.applyData(self.context, **data)
     1253        #except NoTransitionAvailableError:
     1254        #    self.status = Invalid('Review state cannot be changed to '
     1255        #                          'requested state: no such transition '
     1256        #                          'available in workflow.')
     1257        #return
    12531258   
    12541259    @grok.action('Save and return')
    12551260    def saveAndReturn(self, **data):
    1256         try:
    1257             self.applyData(self.context, **data)
    1258         except NoTransitionAvailableError:
    1259             self.status = Invalid('Review state cannot be changed to '
    1260                                   'requested state: no such transition '
    1261                                   'available in workflow.')
    1262             return
     1261        self.applyData(self.context, **data)
     1262       
     1263        #try:
     1264        #    self.applyData(self.context, **data)
     1265        #except NoTransitionAvailableError:
     1266        #    self.status = Invalid('Review state cannot be changed to '
     1267        #                          'requested state: no such transition '
     1268        #                          'available in workflow.')
     1269        #    return
     1270       
    12631271        self.redirect(self.url(self.context))
    12641272        return
Note: See TracChangeset for help on using the changeset viewer.