From 4d6e664ba695809e7339ab7eaa9558bf070cd19b Mon Sep 17 00:00:00 2001 From: constantprojects Date: Tue, 17 Feb 2026 14:54:52 -0700 Subject: [PATCH] Fix NocoDB PATCH using wrong record identifier, causing overwrites update_record was using the custom field ID to identify rows in PATCH requests instead of NocoDB's internal Id primary key. This prevented proper row matching, causing values to be overwritten instead of appended to the comma-separated seeder list. --- xb_seed_status.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xb_seed_status.py b/xb_seed_status.py index b1e9597..1865263 100644 --- a/xb_seed_status.py +++ b/xb_seed_status.py @@ -263,10 +263,10 @@ class NocoDBClient: print(f" DEBUG: get_record error: {e}", file=sys.stderr) return None - def update_record(self, record_id: int | str, value: str) -> bool: + def update_record(self, row_id: int, value: str) -> bool: """Update the seeding_users field on a record.""" try: - data = {self.id_field: int(record_id), self.seeding_field: value} + data = {"Id": row_id, self.seeding_field: value} self._request("PATCH", data=data) return True except Exception as e: @@ -457,7 +457,7 @@ To find field IDs in NocoDB: click field header dropdown → Copy Field ID (star current_seeders.add(username) new_value = format_multiselect(current_seeders) - if noco.update_record(torrent_id, new_value): + if noco.update_record(record["Id"], new_value): print(f" + {torrent_id}: added {username}") api_stats['updated'] += 1 else: