Commit 2dcb354c authored by Łukasz Nowak's avatar Łukasz Nowak

Do not play with assignments.

There is no need that credential update shall do anything with person
assingments. Especially there is no need to set same categories on all
assignments.
parent 6800c05f
...@@ -50,9 +50,7 @@ ...@@ -50,9 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>"""Copy subscription information to related person\n <value> <string>"""Copy subscription information to related person"""\n
Proxy\n
Assignor -- Update Assignment"""\n
\n \n
context.Credential_checkConsistency([\'Person\'])\n context.Credential_checkConsistency([\'Person\'])\n
person = context.getDestinationDecisionValue(portal_type="Person")\n person = context.getDestinationDecisionValue(portal_type="Person")\n
...@@ -88,18 +86,6 @@ context.Credential_copyRegistredInformation(person, person_mapping,copy_none_val ...@@ -88,18 +86,6 @@ context.Credential_copyRegistredInformation(person, person_mapping,copy_none_val
if context.getPassword():\n if context.getPassword():\n
context.Credential_updatePersonPassword()\n context.Credential_updatePersonPassword()\n
\n \n
#We update his assignment too\n
assignment_mapping = (\n
# (credential, assignment)\n
(\'activity_list\', \'activity_list\'),\n
(\'function_list\', \'function_list\'),\n
)\n
\n
for assignment in person.contentValues(portal_type="Assignment", validation_state="open"):\n
assignment.update(comment="Credential Updated Accepted")\n
context.Credential_copyRegistredInformation(assignment, assignment_mapping,copy_none_value=False,erase_empty_value=False)\n
assignment.open(comment="Credential Updated Accepted")\n
\n
#Update the photo\n #Update the photo\n
context.CredentialUpdate_copyDefaultImage()\n context.CredentialUpdate_copyDefaultImage()\n
</string> </value> </string> </value>
......
357 358
\ 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