Skip to content

Commit 08a9302

Browse files
[FEAT] Add expiration metadata to client info
1 parent 828c8f6 commit 08a9302

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

glodo_client/controllers/main.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ def _get_database_info(self, db_name: str) -> dict:
124124
]
125125
)
126126

127+
# Enterprise subscription metadata, when present.
128+
ICP = env["ir.config_parameter"].sudo()
129+
expiration_date = ICP.get_param("database.expiration_date")
130+
expiration_reason = ICP.get_param("database.expiration_reason")
131+
127132
# Get installed modules
128133
modules = env["ir.module.module"].search([("state", "=", "installed")])
129134
module_list = [
@@ -137,6 +142,8 @@ def _get_database_info(self, db_name: str) -> dict:
137142
db_info = {
138143
"name": db_name,
139144
"user_count": user_count,
145+
"expiration_date": expiration_date or None,
146+
"expiration_reason": expiration_reason or None,
140147
"installed_modules": module_list,
141148
"cloc": {},
142149
}

0 commit comments

Comments
 (0)