Skip to content

Commit

Permalink
Merge pull request #330 from pixlise/development
Browse files Browse the repository at this point in the history
4.49.0 Release
  • Loading branch information
RyanStonebraker authored Oct 10, 2024
2 parents 9c70a1b + 8d68e54 commit 166549f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions api/ws/handlers/screen-configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,9 @@ func writeScreenConfiguration(screenConfig *protos.ScreenConfiguration, hctx wsH
widget.Id = formWidgetId(widget, screenConfig.Id, i)
if widget.Data != nil {
// We have widget data, but no ID, so write it to the database with a new ID
_, err := hctx.Svcs.MongoDB.Collection(dbCollections.WidgetDataName).UpdateOne(sessCtx, bson.M{
"_id": widget.Id,
}, bson.M{
"$set": widget.Data,
}, options.Update().SetUpsert(true))
widget.Data.Id = widget.Id
_, err := hctx.Svcs.MongoDB.Collection(dbCollections.WidgetDataName).InsertOne(sessCtx, widget.Data)

if err != nil {
return nil, err
}
Expand Down

0 comments on commit 166549f

Please sign in to comment.