Browse Source

Fix regression introduced in PR #2402

Frédéric Guillot 2 years ago
parent
commit
7a8061fc72
1 changed files with 2 additions and 2 deletions
  1. 2 2
      internal/storage/entry.go

+ 2 - 2
internal/storage/entry.go

@@ -252,8 +252,8 @@ func (s *Storage) cleanupEntries(feedID int64, entryHashes []string) error {
 			entries
 			entries
 		WHERE
 		WHERE
 			feed_id=$1 AND
 			feed_id=$1 AND
-			status=$3 AND
-			NOT (hash=ANY($4))
+			status=$2 AND
+			NOT (hash=ANY($3))
 	`
 	`
 	if _, err := s.db.Exec(query, feedID, model.EntryStatusRemoved, pq.Array(entryHashes)); err != nil {
 	if _, err := s.db.Exec(query, feedID, model.EntryStatusRemoved, pq.Array(entryHashes)); err != nil {
 		return fmt.Errorf(`store: unable to cleanup entries: %v`, err)
 		return fmt.Errorf(`store: unable to cleanup entries: %v`, err)