Re-sign visual-match thumbnails on every detail fetch
Match rows stored a signed URL minted when the scan ran, so it aged out (or used the pre-stable signing scheme) and the modal showed broken tiles even after legacy signatures were fixed. Rows now carry item_id/j_id and the detail serializer mints a fresh thumbnail URL per request; matches whose item no longer exists are dropped.
This commit is contained in:
@@ -60,6 +60,7 @@ def match_hashes(hashes, index, limit=10, user=None, request=None):
|
||||
location = item.locations.first()
|
||||
matches.append(
|
||||
{
|
||||
"item_id": item.id,
|
||||
"j_id": f"J-{item.id}",
|
||||
"filename": Path(location.rel_path).name if location else item.md5,
|
||||
"similarity": round(similarity * 100, 1),
|
||||
|
||||
Reference in New Issue
Block a user