refactor redundant joins, bugfix event insert

This commit is contained in:
johnwang16
2024-10-19 21:24:51 -04:00
parent 9d1fccfe29
commit 400edd35d1
4 changed files with 7 additions and 10 deletions

View File

@@ -747,7 +747,7 @@ def process_plugin_events(db, plugin, pluginsState, plugEventsArr):
sqlParams.append(tuple(tmpList))
# Generate the SQL INSERT query using the collected information.
q = f'INSERT into {dbTable} ({columnsStr}) VALUES ({valuesStr})'
q = f'INSERT OR IGNORE INTO {dbTable} ({columnsStr}) VALUES ({valuesStr})'
# Log a debug message showing the generated SQL query for mapping.
mylog('debug', ['[Plugins] SQL query for mapping: ', q])