From 36c0f18d1ba9c404c29c3f3f963c8ddaf9d8919e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89mile=20R=C3=A9?= Date: Wed, 13 May 2026 18:27:58 +0400 Subject: [PATCH] Fix missing common_third_party_id in vendor queries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LoadByID and LoadByIDs used 4-space indentation and were missed by the bulk column addition. The struct field existed but the SELECT did not return it, causing pgx scan failures. Signed-off-by: Émile Ré Signed-off-by: Émile Ré --- pkg/coredata/third_party.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/coredata/third_party.go b/pkg/coredata/third_party.go index 8259ff702..af305cd5a 100644 --- a/pkg/coredata/third_party.go +++ b/pkg/coredata/third_party.go @@ -205,7 +205,7 @@ SELECT id, tenant_id, organization_id, - common_third_party_id, + common_third_party_id, name, description, category, @@ -272,7 +272,7 @@ SELECT id, tenant_id, organization_id, - common_third_party_id, + common_third_party_id, name, description, category, @@ -1316,7 +1316,7 @@ ORDER BY name ASC return nil } -func (v *Vendor) LoadByOrganizationIDAndCommonThirdPartyID( +func (v *ThirdParty) LoadByOrganizationIDAndCommonThirdPartyID( ctx context.Context, conn pg.Querier, scope Scoper, @@ -1375,7 +1375,7 @@ LIMIT 1; } defer rows.Close() - vendor, err := pgx.CollectExactlyOneRow(rows, pgx.RowToStructByName[Vendor]) + vendor, err := pgx.CollectExactlyOneRow(rows, pgx.RowToStructByName[ThirdParty]) if err != nil { if errors.Is(err, pgx.ErrNoRows) { return ErrResourceNotFound