Skip to content

Commit c5a6e55

Browse files
dido18lucarin91
andauthored
Update internal/orchestrator/bricks/bricks.go
Co-authored-by: Luca Rinaldi <l.rinaldi@arduino.cc>
1 parent c4a97e6 commit c5a6e55

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

internal/orchestrator/bricks/bricks.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,8 @@ func (s *Service) AppBrickInstanceDetails(a *app.ArduinoApp, brickID string) (Br
138138
}
139139

140140
func getSelectedModelOrDefault(appBrick app.Brick, brickIndex *bricksindex.Brick) string {
141-
if appBrick.Model != "" {
142-
return appBrick.Model
143-
}
144141
f.Assert(brickIndex != nil, "bricksindex should be set")
145-
return cmp.Or(brickIndex.ModelName, appBrick.Model)
142+
return cmp.Or(appBrick.Model, appBrick.Model.ModelName)
146143
}
147144

148145
func getInstanceBrickConfigVariableDetails(

0 commit comments

Comments
 (0)