original_docstring: Update user emails in Basket.
  
      This task is triggered when users change their email.
      The task checks whether the user is already subscribed with the old email.
      If there is a subscription we remove it and we register the new email.
      
docstring: Update user emails in Basket.
  This task is triggered when users change their email.
  The task checks whether the user is already subscribed with the old email.
  If there is a subscription we remove it and we register the new email.
docstring_tokens: Update user emails in Basket . This task is triggered when users change their email . The task checks whether the user is already subscribed with the old email . If there is a subscription we remove it and we register the new email .
code: def update_email_in_basket(old_email, new_email):
      """Update user emails in Basket.
  
      This task is triggered when users change their email.
      The task checks whether the user is already subscribed with the old email.
      If there is a subscription we remove it and we register the new email.
      """
      if not BASKET_ENABLED or not waffle.switch_is_active('BASKET_SWITCH_ENABLED'):
          return
  
      chain(
          lookup_user_task.subtask((old_email,)),
          group(
              subscribe_user_task.subtask((new_email,)),
              unsubscribe_user_task.subtask()
          )
      ).delay()
code_tokens: def update_email_in_basket ( old_email , new_email ) : if not BASKET_ENABLED or not waffle . switch_is_active ( 'BASKET_SWITCH_ENABLED' ) : return chain ( lookup_user_task . subtask ( ( old_email , ) ) , group ( subscribe_user_task . subtask ( ( new_email , ) ) , unsubscribe_user_task . subtask ( ) ) ) . delay ( )
short_docstring: Update user emails in Basket.
short_docstring_tokens: Update user emails in Basket .
comment: """Update user emails in Basket.
  
      This task is triggered when users change their email.
      The task checks whether the user is already subscribed with the old email.
      If there is a subscription we remove it and we register the new email.
      """