fyi https://github.com/dimagi/commcare-hq/blob/master/corehq/apps/domain/decorators.py#L229