i basically just copied this pattern: https://github.com/dimagi/commcare-hq/blob/master/corehq/apps/domain/decorators.py#L60. is it over complicated?