Unverified Commit 9b6cd736 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

fix sql statement

Signed-off-by: Sebastian Schüpbach's avatarSebastian Schüpbach <sebastian.schuepbach@unibas.ch>
parent f1f85da4
Pipeline #15999 passed with stages
in 4 minutes and 34 seconds
......@@ -94,7 +94,7 @@ def _create_sql_stmt(table_name, record, fields):
db_fields = ','.join(db_fields)
db_values = ','.join([str(db_value)
if isinstance(db_value, numbers.Number)
else '"{}"'.format(db_value)
else "'{}'".format(db_value)
for db_value in db_values])
return 'INSERT IGNORE INTO {} ({}) VALUES ({})'.format(
table_name, db_fields, db_values)
......@@ -103,6 +103,7 @@ def _create_sql_stmt(table_name, record, fields):
def _create_entities_entry(record, mariadbCursor):
fields = ['sig', 'uri']
sqlStmt = _create_sql_stmt('entities_me', record, fields)
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