cubicweb/server/schemaserial.py
changeset 11429 6a9a9ea1e9b9
parent 11151 4259c55df3e7
child 11763 39df042f4ab4
equal deleted inserted replaced
11428:7995ae2d74be 11429:6a9a9ea1e9b9
    91     """
    91     """
    92     repo = cnx.repo
    92     repo = cnx.repo
    93     dbhelper = repo.system_source.dbhelper
    93     dbhelper = repo.system_source.dbhelper
    94 
    94 
    95     # Computed Rtype
    95     # Computed Rtype
    96     with cnx.ensure_cnx_set:
    96     tables = set(t.lower() for t in dbhelper.list_tables(cnx.cnxset.cu))
    97         tables = set(t.lower() for t in dbhelper.list_tables(cnx.cnxset.cu))
    97     has_computed_relations = 'cw_cwcomputedrtype' in tables
    98         has_computed_relations = 'cw_cwcomputedrtype' in tables
       
    99     # computed attribute
    98     # computed attribute
   100     try:
    99     try:
   101         cnx.system_sql("SELECT cw_formula FROM cw_CWAttribute")
   100         cnx.system_sql("SELECT cw_formula FROM cw_CWAttribute")
   102         has_computed_attributes = True
   101         has_computed_attributes = True
   103     except Exception:
   102     except Exception: