diff --git a/atst/models/environment.py b/atst/models/environment.py index 2d56f9da..61b5c910 100644 --- a/atst/models/environment.py +++ b/atst/models/environment.py @@ -23,5 +23,9 @@ class Environment(Base, mixins.TimestampsMixin, mixins.AuditableMixin): def num_users(self): return len(self.users) + @property + def displayname(self): + return self.name + def auditable_workspace_id(self): return self.project.workspace_id diff --git a/atst/models/project.py b/atst/models/project.py index c276b240..cd9ab019 100644 --- a/atst/models/project.py +++ b/atst/models/project.py @@ -16,3 +16,8 @@ class Project(Base, mixins.TimestampsMixin, mixins.AuditableMixin): workspace_id = Column(ForeignKey("workspaces.id"), nullable=False) workspace = relationship("Workspace") environments = relationship("Environment", back_populates="project") + + + @property + def displayname(self): + return self.name