submissions: detect sentinel value

This commit is contained in:
Quaternions 2025-03-26 15:33:47 -07:00
parent 85a144e276
commit 2867da4b21
Signed by: Quaternions
GPG Key ID: D0DF5964F79AC131
2 changed files with 7 additions and 2 deletions
pkg

@ -10,7 +10,7 @@ type ValidateRequest struct {
SubmissionID int64
ModelID int64
ModelVersion int64
ValidatedModelID int64 // optional value
ValidatedModelID *int64 // optional value
}
// Create a new map

@ -534,7 +534,12 @@ func (svc *Service) ActionSubmissionTriggerValidate(ctx context.Context, params
SubmissionID: submission.ID,
ModelID: submission.AssetID,
ModelVersion: submission.AssetVersion,
ValidatedModelID: submission.ValidatedAssetID,
ValidatedModelID: nil,
}
// sentinel values because we're not using rust
if submission.ValidatedAssetID != 0 {
validate_request.ValidatedModelID = &submission.ValidatedAssetID
}
j, err := json.Marshal(validate_request)