Commit dd7bffd1 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

call activate() in the same transaction otherwise we may get lots of...

call activate() in the same transaction otherwise we may get lots of UnsupportedWorkflowMethod errors.
parent dde3c2bf
...@@ -57,7 +57,8 @@ if portal.portal_preferences.getPreferredCredentialRequestAutomaticApproval():\n ...@@ -57,7 +57,8 @@ if portal.portal_preferences.getPreferredCredentialRequestAutomaticApproval():\n
result = module.searchFolder(portal_type=\'Credential Request\',\n result = module.searchFolder(portal_type=\'Credential Request\',\n
validation_state=\'submitted\')\n validation_state=\'submitted\')\n
for document in result:\n for document in result:\n
document.activate().accept()\n if document.getValidationState() == \'submitted\':\n
document.accept()\n
\n \n
if portal.portal_preferences.getPreferredPersonCredentialUpdateAutomaticApproval() and \\\n if portal.portal_preferences.getPreferredPersonCredentialUpdateAutomaticApproval() and \\\n
portal.portal_preferences.getPreferredOrganisationCredentialUpdateAutomaticApproval():\n portal.portal_preferences.getPreferredOrganisationCredentialUpdateAutomaticApproval():\n
...@@ -65,7 +66,8 @@ if portal.portal_preferences.getPreferredPersonCredentialUpdateAutomaticApproval ...@@ -65,7 +66,8 @@ if portal.portal_preferences.getPreferredPersonCredentialUpdateAutomaticApproval
result = module.searchFolder(portal_type=\'Credential Update\',\n result = module.searchFolder(portal_type=\'Credential Update\',\n
validation_state=\'submitted\')\n validation_state=\'submitted\')\n
for document in result:\n for document in result:\n
document.activate().accept()\n if document.getValidationState() == \'submitted\':\n
document.accept()\n
elif portal.portal_preferences.getPreferredPersonCredentialUpdateAutomaticApproval() and \\\n elif portal.portal_preferences.getPreferredPersonCredentialUpdateAutomaticApproval() and \\\n
not portal.portal_preferences.getPreferredOrganisationCredentialUpdateAutomaticApproval():\n not portal.portal_preferences.getPreferredOrganisationCredentialUpdateAutomaticApproval():\n
module = context.getDefaultModule(\'Credential Update\')\n module = context.getDefaultModule(\'Credential Update\')\n
...@@ -73,7 +75,8 @@ elif portal.portal_preferences.getPreferredPersonCredentialUpdateAutomaticApprov ...@@ -73,7 +75,8 @@ elif portal.portal_preferences.getPreferredPersonCredentialUpdateAutomaticApprov
validation_state=\'submitted\')\n validation_state=\'submitted\')\n
for document in result:\n for document in result:\n
if document.getDestinationDecisionValue().getPortalType() == \'Person\':\n if document.getDestinationDecisionValue().getPortalType() == \'Person\':\n
document.activate().accept()\n if document.getValidationState() == \'submitted\':\n
document.accept()\n
elif not portal.portal_preferences.getPreferredPersonCredentialUpdateAutomaticApproval() and \\\n elif not portal.portal_preferences.getPreferredPersonCredentialUpdateAutomaticApproval() and \\\n
portal.portal_preferences.getPreferredOrganisationCredentialUpdateAutomaticApproval():\n portal.portal_preferences.getPreferredOrganisationCredentialUpdateAutomaticApproval():\n
module = context.getDefaultModule(\'Credential Update\')\n module = context.getDefaultModule(\'Credential Update\')\n
...@@ -81,14 +84,16 @@ elif not portal.portal_preferences.getPreferredPersonCredentialUpdateAutomaticAp ...@@ -81,14 +84,16 @@ elif not portal.portal_preferences.getPreferredPersonCredentialUpdateAutomaticAp
validation_state=\'submitted\')\n validation_state=\'submitted\')\n
for document in result:\n for document in result:\n
if document.getDestinationDecisionValue().getPortalType() == \'Organisation\':\n if document.getDestinationDecisionValue().getPortalType() == \'Organisation\':\n
document.activate().accept()\n if document.getValidationState() == \'submitted\':\n
document.accept()\n
\n \n
if portal.portal_preferences.getPreferredCredentialRecoveryAutomaticApproval():\n if portal.portal_preferences.getPreferredCredentialRecoveryAutomaticApproval():\n
module = context.getDefaultModule(\'Credential Recovery\')\n module = context.getDefaultModule(\'Credential Recovery\')\n
result = module.searchFolder(portal_type=\'Credential Recovery\',\n result = module.searchFolder(portal_type=\'Credential Recovery\',\n
validation_state=\'submitted\')\n validation_state=\'submitted\')\n
for document in result:\n for document in result:\n
document.activate().accept()\n if document.getValidationState() == \'submitted\':\n
document.accept()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
415 416
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment