Closed silent-conspiracy closed 4 years ago
Suppose the following models:
class Account(TenantModel): tenant_id = 'id' ... class Project(TenantModel): tenant_id = 'account_id' ... class Revenue(TenantModel): acc = models.ForeignKey(Account, ...) project = TenantForeignKey(Project, ...) tenant_id = 'acc_id' ...
When accessing revenue.project Django will throw:
revenue.project
django.core.exceptions.FieldError: Cannot resolve keyword 'acc_id' into field. Choices are: ...
Suppose the following models:
When accessing
revenue.project
Django will throw: