mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 07:22:37 -07:00
Add last_insert_id module to database
This commit is contained in:
parent
8925a0dc78
commit
7d3711bf5a
2 changed files with 7 additions and 2 deletions
|
@ -265,8 +265,7 @@ class ActivityProcessor(object):
|
|||
'reference_id': result[1]['reference_id']}
|
||||
else:
|
||||
# Get the last insert row id
|
||||
result = self.db.select(query='SELECT last_insert_rowid() AS last_id')
|
||||
last_id = result[0]['last_id'] if result else None
|
||||
last_id = self.db.last_insert_id()
|
||||
|
||||
query = 'UPDATE session_history SET reference_id = ? WHERE id = ? '
|
||||
# If rating_key is the same in the previous session, then set the reference_id to the previous row, else set the reference_id to the new id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue