Change linked namespace causes 500 error when no namespace/group are associated with account
Summary
On /subscriptions
page, clicking the "Change linked namespace" of a subscription causes a 500 error when no .com group is linked to the account.
Generates an ActionView::Template::Error
undefined method 'map' for nil:NilClass
Steps to reproduce
Have a customers portal account with an active subscription, but no GitLab.com account linked to it. Click "Change linked namespace"
Relevant logs and/or screenshots
https://sentry.gitlab.net/gitlab/customersgitlabcom/issues/1678514/events/32127117/
Workarounds
Link a .com account to the customer portal account first