TenantBase interview question

Code challenge from github repo