From 98416a025db8f48d9918508b381212ebb9408ac6 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Wed, 7 Jan 2026 14:25:40 +0000 Subject: [PATCH] Fix uuidShort to handle real UUIDs now that we have them --- html.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/html.go b/html.go index 1dee56f3..44fe5836 100644 --- a/html.go +++ b/html.go @@ -943,12 +943,13 @@ func breedingSourcesByCell(ctx context.Context, org *models.Organization, c h3.C return results, nil } -func uuidShort(uuid string) string { - if len(uuid) < 7 { - return uuid // Return as is if too short +func uuidShort(uuid uuid.UUID) string { + s := uuid.String() + if len(s) < 7 { + return s // Return as is if too short } - return uuid[:3] + "..." + uuid[len(uuid)-4:] + return s[:3] + "..." + s[len(s)-4:] } func sourceByGlobalId(ctx context.Context, org *models.Organization, id uuid.UUID) (*BreedingSourceDetail, error) {