Exemple #1
0
    def previous_submitter(self):

        # Get the history data
        history_view = ContentHistoryView(self.context, self.request)
        workflow_history = history_view.workflowHistory()

        # Pull the people who submitted this
        people = [x.get('actor', {}).get('username', None) for x in workflow_history if x.get('action', '') == 'submit']

        # Filter empties
        people = [x for x in people if x]

        # Return the most recent one, if we have people
        if people:
            return people[0]