Skip to content

Commit d8eb8b0

Browse files
committed
extra nil check for bulk update
1 parent 0ef9e5c commit d8eb8b0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cmd/device-definitions-api/bulk_update_powertrain.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ func (p *bulkUpdatePowertrain) Execute(ctx context.Context, _ *flag.FlagSet, _ .
107107
notFoundDefinitions = append(notFoundDefinitions, definitionID)
108108
continue
109109
}
110+
if deviceDefinition == nil {
111+
fmt.Printf("%s: Device definition not found\n", definitionID)
112+
notFoundDefinitions = append(notFoundDefinitions, definitionID)
113+
}
110114

111115
manufName, err := onChainSvc.GetManufacturerNameByID(ctx, manufID)
112116
if err != nil {

0 commit comments

Comments
 (0)