Mercurial > dive4elements > river
diff flys-backend/contrib/shpimporter/dgm.py @ 5267:9245f4b434b3
Fix syntax error in next_id and remove obsolete oracle parameter
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 13 Mar 2013 10:34:29 +0100 |
parents | 8f71fe38977c |
children | 7d29c277000e |
line wrap: on
line diff
--- a/flys-backend/contrib/shpimporter/dgm.py Wed Mar 13 10:33:46 2013 +0100 +++ b/flys-backend/contrib/shpimporter/dgm.py Wed Mar 13 10:34:29 2013 +0100 @@ -58,10 +58,10 @@ NEXT_IDS = {} -def next_id(cur, relation, oracle): +def next_id(cur, relation): idx = NEXT_IDS.get(relation) if idx is None: - cur.execute(SQL_NEXT_ID % relation) + cur.execute(SQL_NEXT_ID % relation) idx = cur.fetchone()[0] NEXT_IDS[relation] = idx + 1 return idx @@ -73,7 +73,7 @@ cur.execute(SQL_SELECT_RANGE_ID, (river_id, a, b)) row = cur.fetchone() if row: return row[0] - idx = next_id(cur, "ranges", oracle) + idx = next_id(cur, "ranges") if oracle: cur.execute(SQL_INSERT_RANGE_ID_ORA, (idx, river_id, a, b)) else: @@ -90,7 +90,7 @@ cur.execute(SQL_SELECT_TIME_ID, (a, b)) row = cur.fetchone() if row: return row[0] - idx = next_id(cur, "time_intervals", oracle) + idx = next_id(cur, "time_intervals") if oracle: cur.execute(SQL_INSERT_TIME_ID_ORA, (idx, a, b)) else: