Commit c4755557 authored by Tristan Cavelier's avatar Tristan Cavelier Committed by Cédric Le Ninivin

free_subscription: set email to free subscription request on acceptation

If the email is not already set during acceptation
parent 7db674f6
...@@ -58,7 +58,11 @@ if not context.getReference():\n ...@@ -58,7 +58,11 @@ if not context.getReference():\n
context.FreeSubscriptionRequest_generateReference()\n context.FreeSubscriptionRequest_generateReference()\n
if context.getValidationState() != \'submitted\':\n if context.getValidationState() != \'submitted\':\n
return\n return\n
if context.getDestination():\n person = context.getDestinationValue()\n
if person:\n
email = person.getDefaultEmailCoordinateText()\n
if email and not context.getDefaultEmailCoordinateText(): # XXX workaround to fill the email field if not already set\n
context.setDefaultEmailCoordinateText(email)\n
context.accept()\n context.accept()\n
elif context.getDefaultEmailCoordinateText():\n elif context.getDefaultEmailCoordinateText():\n
email = context.getDefaultEmailCoordinateText()\n email = context.getDefaultEmailCoordinateText()\n
......
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