mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 23:17:32 -02:30
Add Instance.role property.
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user