Today we are selecting the tenant instance for every TenantAware model save.
Ideally, we should retrieve the Tenant instance on the middleware, but then there is no easy way to make the middlewares know the Tenant model name.
-
One idea is to inject a default value as a class attribute on the TenantLocal class. But we still need to check it.
-
Another idea is to fallback and creates a settings parameter that explicitly defines the Tenant Model Class name like myapp.MyTenant.
Today we are selecting the tenant instance for every TenantAware model save.
Ideally, we should retrieve the Tenant instance on the middleware, but then there is no easy way to make the middlewares know the Tenant model name.
One idea is to inject a default value as a class attribute on the TenantLocal class. But we still need to check it.
Another idea is to fallback and creates a settings parameter that explicitly defines the Tenant Model Class name like
myapp.MyTenant.