Skip to content

fixing filtering of lists#311

Merged
orangecoding merged 2 commits into
masterfrom
fixing-listing-filtering
Jun 2, 2026
Merged

fixing filtering of lists#311
orangecoding merged 2 commits into
masterfrom
fixing-listing-filtering

Conversation

@orangecoding
Copy link
Copy Markdown
Owner

Problem...
In storeListings, each listing row is saved with two distinct identifiers:

  • id = a fresh nanoid() (the DB primary key)
  • hash = item.id (the provider-assigned listing ID, e.g. "12345" from Kleinanzeigen)

After _save, the listing objects in memory still carry the provider ID in listing.id. The three post-save filter methods (_filterBySimilarListings, _filterBySpecs, _filterByArea) all collected those values and passed them to
deleteListingsById, which ran:

UPDATE listings SET manually_deleted = 1 WHERE id IN (?)

The id column holds nanoids, so the provider IDs never matched, the soft-delete was a no-op and filtered listings remained visible.

@AbdallahZerfaoui
Copy link
Copy Markdown

AbdallahZerfaoui commented May 31, 2026

I have tested fixing-listing-filtering branch, and it has generated a new bug.

@orangecoding orangecoding merged commit a834abc into master Jun 2, 2026
2 checks passed
@orangecoding orangecoding deleted the fixing-listing-filtering branch June 2, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants