passiomatic / coldsweat

Web RSS aggregator and reader compatible with the Fever API
MIT License
146 stars 21 forks source link

Avoid multiple database Integrity errors while marking a feed/group/all as read #47

Closed passiomatic closed 10 years ago

passiomatic commented 10 years ago

An IntegrityError exceptions show up in log file while marking a feed/group/all as read, due to a dumb query:

q = Entry.select().join(Feed).join(Subscription).where(
  (Subscription.user == user) &
  (Entry.last_updated_on < before)
).naive()

Coldsweat should filter the result set to exclude entries already marked as read.