fix - improve response time of org linked ranchers

This commit is contained in:
2026-01-04 10:39:02 +03:30
parent abf1c12e39
commit 627075735c
4 changed files with 62 additions and 36 deletions

View File

@@ -16,6 +16,7 @@ class Herd(BaseModel):
'Rancher',
on_delete=models.CASCADE,
related_name='herd',
db_index=True,
null=True
)
cooperative = models.ForeignKey(
@@ -153,12 +154,14 @@ class RancherOrganizationLink(BaseModel):
Organization,
on_delete=models.CASCADE,
related_name='rancher_links',
db_index=True,
null=True
)
rancher = models.ForeignKey(
Rancher,
on_delete=models.CASCADE,
related_name='organization_links',
db_index=True,
null=True
)