# HG changeset patch # User Thierry Florac # Date 1453135477 -3600 # Node ID 4c1e7b57e1247d088a7c142afda6c247e9c94afe # Parent eb468be7c127330705450e8694cb60b3c21018ee Updated workflow publication interface diff -r eb468be7c127 -r 4c1e7b57e124 src/pyams_content/workflow/__init__.py --- a/src/pyams_content/workflow/__init__.py Mon Jan 18 17:44:04 2016 +0100 +++ b/src/pyams_content/workflow/__init__.py Mon Jan 18 17:44:37 2016 +0100 @@ -183,13 +183,14 @@ """Publish version""" request = check_request() translate = request.localizer.translate - IWorkflowPublicationInfo(context).publication_date = datetime.utcnow() + publication_info = IWorkflowPublicationInfo(context) + publication_info.publication_date = datetime.utcnow() + publication_info.publisher = request.principal.id version_id = IWorkflowState(context).version_id for version in IWorkflowVersions(context).get_versions((PUBLISHED, RETIRING, RETIRED, ARCHIVING)): if version is not context: IWorkflowInfo(version).fire_transition_toward('archived', comment=translate(_("Published version {0}")).format(version_id)) - IWfSharedContent(context).publisher = request.principal.id def archive_action(wf, context):