Look for list of domains in get_document_or_404
Look at domain and domains for get_document_or_404
Handle doc without domain or domains
Merge pull request #4760 from dimagi/fix-edit-web-user

Look for list of domains in get_document_or_404