fix(02-03): treat null foreign keys as valid masked ids

PHP album payloads leave discogs_id null. The id mask required an
integer and failed PHP self-replay on otherwise identical bodies.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jakub Zych
2026-09-17 12:52:06 +02:00
parent 591a0d4681
commit 5b947c7454
2 changed files with 7 additions and 0 deletions

View File

@@ -81,6 +81,9 @@ func maskDate(path string, val any, diffs *[]Diff) any {
}
func maskIDValue(path string, val any, diffs *[]Diff) any {
if val == nil {
return nil
}
n, ok := val.(json.Number)
if !ok {
*diffs = append(*diffs, Diff{Path: path, Expected: "integer id", Actual: formatValue(val)})