mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
bdd: clean up DB ops steps
Adds comments and modernizes code.
This commit is contained in:
@@ -196,7 +196,7 @@ class DBRow:
|
||||
if actual == 0:
|
||||
return "place ID 0"
|
||||
|
||||
with self.context.db.cursor():
|
||||
with self.context.db.cursor() as cur:
|
||||
cur.execute("""SELECT osm_type, osm_id, class
|
||||
FROM placex WHERE place_id = %s""",
|
||||
(actual, ))
|
||||
|
||||
Reference in New Issue
Block a user