forked from platypush/platypush
Keep track of the newly inserted token records in media.local.search, or we can experience UniqueConstraint violations upon session commit because of duplicate records
This commit is contained in:
parent
1dca11c0be
commit
e9c7104242
1 changed files with 1 additions and 0 deletions
|
@ -99,6 +99,7 @@ class LocalMediaSearcher(MediaSearcher):
|
|||
continue
|
||||
record = MediaToken.build(token=token)
|
||||
session.add(record)
|
||||
records[token] = record
|
||||
|
||||
session.commit()
|
||||
return session.query(MediaToken).filter(
|
||||
|
|
Loading…
Reference in a new issue