mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 15:21:13 +03:00
Add Instance.role property.
This commit is contained in:
parent
072ab2118f
commit
35c6c72f2e
@ -16,3 +16,9 @@ class Instance(models.Model):
|
||||
class Meta:
|
||||
app_label = 'main'
|
||||
|
||||
@property
|
||||
def role(self):
|
||||
"""Return the role of this instance, as a string."""
|
||||
if self.primary:
|
||||
return 'primary'
|
||||
return 'secondary'
|
||||
|
Loading…
Reference in New Issue
Block a user