Commit 3c9e23a9 authored by Danijel Schorlemmer's avatar Danijel Schorlemmer
Browse files

Released the restriction that all assets of one location need to be sequential in the SARA file

parent 61aed890
Pipeline #20843 passed with stage
in 1 minute and 18 seconds
......@@ -192,7 +192,13 @@ class CoquimboDatabase(Database):
sql_statement = "INSERT INTO Location "
sql_statement += "(id, occupancy, geom, admin_id, admin_name) "
sql_statement += "VALUES (%d, '%s', %s, %d, '%s')" % (index, occupancy, geom, admin_id, admin_name)
sql_statement += "VALUES (%d, '%s', %s, %d, '%s')" % (
index,
occupancy,
geom,
admin_id,
admin_name,
)
self.cursor.execute(sql_statement)
# return self.cursor.lastrowid
......@@ -341,7 +347,13 @@ class CoquimboDatabase(Database):
# Create entries in the Location table
for location in location_list:
location_id = location_list.index(location)
self.insert_location(location_id, row[4], "GeomFromText('POINT(%s %s)', 4326)" % (location[0], location[1]), int(row[2]), row[3])
self.insert_location(
location_id,
row[4],
"GeomFromText('POINT(%s %s)', 4326)" % (location[0], location[1]),
int(row[2]),
row[3],
)
logger.debug("Location %d created" % location_id)
self.connection.commit()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment