import - rancher organization linked deploy --> with dashboards of cooperative management oage
This commit is contained in:
@@ -146,3 +146,24 @@ class Rancher(BaseModel):
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
return super(Rancher, self).save(*args, **kwargs)
|
||||
|
||||
|
||||
class RancherOrganizationLink(BaseModel):
|
||||
organization = models.ForeignKey(
|
||||
Organization,
|
||||
on_delete=models.CASCADE,
|
||||
related_name='rancher_links',
|
||||
null=True
|
||||
)
|
||||
rancher = models.ForeignKey(
|
||||
Rancher,
|
||||
on_delete=models.CASCADE,
|
||||
related_name='organization_links',
|
||||
null=True
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
return f'rancher: {self.rancher.id} - organization: {self.organization.id}'
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
return super(RancherOrganizationLink, self).save(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user