Commit 71eb7233 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 bb828d1a
......@@ -58,7 +58,11 @@ if not context.getReference():\n
context.FreeSubscriptionRequest_generateReference()\n
if context.getValidationState() != \'submitted\':\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
elif 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