X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/7205491b8495e48c62b28373d1746e77d475582b..a7a920a9a5b55bf4290b184f05898a8589c95b40:/nominatim/tools/check_database.py?ds=sidebyside diff --git a/nominatim/tools/check_database.py b/nominatim/tools/check_database.py index 8ffd93fe..288eb916 100644 --- a/nominatim/tools/check_database.py +++ b/nominatim/tools/check_database.py @@ -248,7 +248,10 @@ def check_existance_wikipedia(conn: Connection, _: Configuration) -> CheckResult return CheckState.NOT_APPLICABLE with conn.cursor() as cur: - cnt = cur.scalar('SELECT count(*) FROM wikipedia_article') + if conn.table_exists('wikimedia_importance'): + cnt = cur.scalar('SELECT count(*) FROM wikimedia_importance') + else: + cnt = cur.scalar('SELECT count(*) FROM wikipedia_article') return CheckState.WARN if cnt == 0 else CheckState.OK