submissions: detect sentinel value
This commit is contained in:
parent
85a144e276
commit
2867da4b21
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user