@@ -35,23 +35,6 @@ def get_db_registry(db_name: str) -> Registry:
3535 raise NotFound (f"Database '{ db_name } ' not accessible: { e } " ) from e
3636
3737
38- def is_glodo_compatible (db_name : str ) -> bool :
39- """Check if a database has glodo_client installed."""
40- try :
41- registry = Registry (db_name )
42- with registry .cursor () as cr :
43- cr .execute (
44- """
45- SELECT 1 FROM ir_module_module
46- WHERE name = 'glodo_client'
47- AND state = 'installed'
48- """
49- )
50- return cr .fetchone () is not None
51- except Exception :
52- return False
53-
54-
5538class GlodoCloudClient (Controller ):
5639 """
5740 Controller endpoints for Glodo Cloud client functionality.
@@ -117,9 +100,6 @@ def info(self, **kwargs):
117100
118101 # Gather info for each compatible database
119102 for db_name in all_dbs :
120- if not is_glodo_compatible (db_name ):
121- continue
122-
123103 db_info = self ._get_database_info (db_name )
124104 if db_info :
125105 result ["databases" ].append (db_info )
@@ -199,9 +179,6 @@ def users(self, **kwargs):
199179 if not db_name :
200180 raise BadRequest ("Missing 'database' in request payload" )
201181
202- if not is_glodo_compatible (db_name ):
203- raise NotFound (f"Database '{ db_name } ' is not compatible" )
204-
205182 try :
206183 registry = Registry (db_name )
207184 with registry .cursor () as cr :
@@ -269,9 +246,6 @@ def become(self, **kwargs):
269246 except (TypeError , ValueError ) as e :
270247 raise BadRequest ("Invalid user_id format" ) from e
271248
272- if not is_glodo_compatible (db_name ):
273- raise NotFound (f"Database '{ db_name } ' is not compatible" )
274-
275249 # Validate user exists and is suitable
276250 try :
277251 registry = Registry (db_name )
@@ -351,9 +325,6 @@ def user_manage(self, **kwargs):
351325 except (TypeError , ValueError ) as e :
352326 raise BadRequest ("Invalid user_id format" ) from e
353327
354- if not is_glodo_compatible (db_name ):
355- raise NotFound (f"Database '{ db_name } ' is not compatible" )
356-
357328 try :
358329 registry = Registry (db_name )
359330 with registry .cursor () as cr :
0 commit comments