Fix deleting database rows with Python3 list(map())

This commit is contained in:
JonnyWong16 2020-04-12 19:17:57 -07:00
parent 94f929743c
commit 0ed4b69b8f
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
3 changed files with 3 additions and 3 deletions

View file

@ -68,7 +68,7 @@ def delete_recently_added():
def delete_rows_from_table(table, row_ids):
if row_ids and isinstance(row_ids, str):
row_ids = map(cast_to_int, row_ids.split(','))
row_ids = list(map(cast_to_int, row_ids.split(',')))
logger.info("Tautulli Database :: Deleting row ids %s from %s database table", row_ids, table)
query = "DELETE FROM " + table + " WHERE id IN (%s) " % ','.join(['?'] * len(row_ids))