mozilla-it / ctms-api

Mozilla Public License 2.0
7 stars 1 forks source link

Unexpected behavior when `PUT`ing a contact with legacy waitlists #734

Closed grahamalama closed 2 months ago

grahamalama commented 1 year ago
  1. POST contact with a legacy waitlist field (VPN):

    ...
    'relay_waitlist': None,
    'vpn_waitlist': {'geo': 'us', 'platform': None},
    'waitlists': []
    }

    success ✅

  2. GET that object back, looks like this:

    'relay_waitlist': {'geo': None},
    ...
    'vpn_waitlist': {'geo': 'us', 'platform': None},
    'waitlists': [{'fields': {'geo': 'us', 'platform': None},
                'name': 'vpn',
                'source': None}]
    }
  3. PUT the contact, signing up for another waitlist through a legacy field (Relay):

    'relay_waitlist': {'geo': 'us'},
    'vpn_waitlist': {'geo': 'us', 'platform': None},
    'waitlists': [{'fields': {'geo': 'us', 'platform': None},
                'name': 'vpn',
                'source': None,
                'subscribed': True}]
    }

Expected: User is signed up for the relay and vpn waitlists Actual: User is only signed up for the VPN waitlist

I'm pretty sure that's because of this.

leplatrem commented 1 year ago

Since Basket does not set those fields anymore, this is less urgent than #733