fix(12.2): close code-review blockers on uploads, JSON caps, and pivot fill
Keep form save behind in-flight uploads, make retries idempotent via X-Upload-Id, cap remaining JSON bodies, and surface pending pivot type errors instead of zeroing them. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -469,7 +469,9 @@ func (s RelationService) ShowPivot(ctx context.Context, cc *CompiledController,
|
||||
return lifecycleFailure(cc, err)
|
||||
}
|
||||
row := cr.Contract.NewPivot()
|
||||
_ = lagoon.Fill(row, pivotFillKeys(cr), ProjectWritableFields(cr.pivot, env.Pivot), false)
|
||||
if err := lagoon.Fill(row, pivotFillKeys(cr), ProjectWritableFields(cr.pivot, env.Pivot), false); err != nil {
|
||||
return lifecycleFailure(cc, err)
|
||||
}
|
||||
data = pivotRecord(cr, row, childID)
|
||||
return nil
|
||||
}
|
||||
@@ -564,7 +566,9 @@ func (s RelationService) updatePendingPivot(ctx context.Context, tx *gorm.DB, cc
|
||||
return nil, lifecycleFailure(cc, err)
|
||||
}
|
||||
row := cr.Contract.NewPivot()
|
||||
_ = lagoon.Fill(row, pivotFillKeys(cr), ProjectWritableFields(cr.pivot, env.Pivot), false)
|
||||
if err := lagoon.Fill(row, pivotFillKeys(cr), ProjectWritableFields(cr.pivot, env.Pivot), false); err != nil {
|
||||
return nil, lifecycleFailure(cc, err)
|
||||
}
|
||||
if err := s.fillPivot(ctx, tx, cr, row, values); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user