From c205a930a54375a9ceb6a0d515fe42e734f5618a Mon Sep 17 00:00:00 2001 From: eric-intuitem <71850047+eric-intuitem@users.noreply.github.com> Date: Sat, 30 Nov 2024 22:40:47 +0100 Subject: [PATCH] Update status.py --- backend/core/management/commands/status.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/core/management/commands/status.py b/backend/core/management/commands/status.py index bbee0ed8e..f8d345a8b 100644 --- a/backend/core/management/commands/status.py +++ b/backend/core/management/commands/status.py @@ -22,8 +22,9 @@ def handle(self, *args, **kwargs): nb_risk_assessments = RiskAssessment.objects.all().count() nb_risk_scenarios = RiskScenario.objects.all().count() nb_risk_acceptances = RiskAcceptance.objects.all().count() - nb_seats_available = getattr(settings, "LICENSE_SEATS", 0) - nb_expiry_date = getattr(settings, "LICENSE_EXPIRATION", "") + nb_seats = getattr(settings, "LICENSE_SEATS", 0) + nb_editors = len(User.get_editors()) + expiration = getattr(settings, "LICENSE_EXPIRATION", "") created_at = Folder.get_root_folder().created_at last_login = max( @@ -41,5 +42,5 @@ def handle(self, *args, **kwargs): + f"threats={nb_threats} functions={nb_functions} measures={nb_measures} " + f"evidences={nb_evidences} compliance={nb_compliance_assessments} risk={nb_risk_assessments} " + f"scenarios={nb_risk_scenarios} acceptances={nb_risk_acceptances} " - + f"number_of_seats={nb_seats_available} expiry_date={nb_expiry_date}" + + f"seats={nb_seats} editors={nb_editors} expiration={expiration}" )