Make IgnoredKeywords.watch a real Link column to Settings

Replace the hand-copied search_url (URL type) with a proper relation:
- watch: LinkToAnotherRecord (belongs-to, many keywords -> one Settings row),
  picked from a dropdown in the UI so a wrong URL can't silently disable a keyword
- search_url: Lookup column that auto-fills Settings.url through the link

_ensure_keyword_watch_link() builds both columns idempotently on bootstrap and
upgrades a legacy URL-typed search_url to Link+Lookup. load_ignored_keywords()
now normalises Lookup values (string or array).
This commit is contained in:
2026-09-13 18:11:51 +08:00
parent 5ab42c2a15
commit a72d2d5b62
4 changed files with 106 additions and 20 deletions
+5 -3
View File
@@ -29,9 +29,11 @@ listing to a NocoDB base (with image URL + thumbnail), and alerts Telegram.
**IgnoredSellers** — `seller_name`. Add/remove sellers here to suppress Telegram
alerts for their listings (still archived, marked `skip_notify=true`).
**IgnoredKeywords** — `search_url` + `keyword`. Per-watch title blocklist: keyword
applies only to listings from the watch whose `Settings.url` matches `search_url`;
case-insensitive substring match against the title. Still archived.
**IgnoredKeywords** — `watch` (Link → Settings) + `keyword`. Per-watch title
blocklist: pick the watch from a dropdown, add one keyword per row. A keyword only
applies to listings from the linked watch; case-insensitive substring match against
the title. `search_url` is a Lookup column that auto-fills from the linked watch.
Still archived.
## Run