Fix missing common_third_party_id in vendor queries

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é <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-05-13 18:27:58 +04:00
committed by Émile Ré
parent d6f268cb06
commit 36c0f18d1b

View File

@@ -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