Skip to content

Commit 2970689

Browse files
committed
Made GetOrCreateBoard method coherent with others implementations
1 parent 7845cee commit 2970689

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

cores/loader.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,21 +261,22 @@ func (platform *PlatformRelease) loadBoards() error {
261261

262262
for boardID, boardProperties := range propertiesByBoard {
263263
boardProperties["_id"] = boardID // TODO: What is that for??
264-
board := platform.getOrCreateBoard(boardID)
264+
board := platform.GetOrCreateBoard(boardID)
265265
board.Properties.Merge(boardProperties)
266-
platform.Boards[boardID] = board
267266
}
268267

269268
return nil
270269
}
271270

272-
func (platform *PlatformRelease) getOrCreateBoard(boardID string) *Board {
271+
func (platform *PlatformRelease) GetOrCreateBoard(boardID string) *Board {
273272
if board, ok := platform.Boards[boardID]; ok {
274273
return board
275274
}
276-
return &Board{
275+
board := &Board{
277276
BoardId: boardID,
278277
Properties: properties.Map{},
279278
PlatformRelease: platform,
280279
}
280+
platform.Boards[boardID] = board
281+
return board
281282
}

0 commit comments

Comments
 (0)