Ignore:
Timestamp:
28 Aug 2011, 20:05:42 (13 years ago)
Author:
Henrik Bettermann
Message:

Don't add log message when no attribute has been changed, but log all transitions.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/applicants
Files:
2 edited

Legend:

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

    r6622 r6644  
    762762        self.flash('Form has been saved.')
    763763        ob_class = self.__implemented__.__name__.replace('waeup.sirp.','')
    764         self.context.loggerInfo(ob_class, 'saved: % s' % fields_string)
     764        if fields_string:
     765            self.context.loggerInfo(ob_class, 'saved: % s' % fields_string)
    765766        return
    766767
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/workflow.py

    r6471 r6644  
    88from waeup.sirp.interfaces import IObjectHistory, IWAeUPWorkflowInfo
    99from waeup.sirp.workflow import WAeUPWorkflow, WAeUPWorkflowInfo
     10from waeup.sirp.utils.helpers import get_current_principal
    1011
    1112INITIALIZED = 'initialized'
     
    124125    history = IObjectHistory(obj)
    125126    history.addMessage(msg)
     127    # In some tests we don't have a an applicants root or a user
     128    try:
     129        user = get_current_principal()
     130        applicants_root = grok.getSite()['applicants']
     131        applicants_root.logger.info('%s - %s - %s' % (user.id,obj.access_code,msg))
     132    except (TypeError, AttributeError):
     133        pass
    126134    return
Note: See TracChangeset for help on using the changeset viewer.