Skip to content

Commit

Permalink
Merge pull request #116 from Frisle/master
Browse files Browse the repository at this point in the history
FIX: errors when dataSource did not exist and cubeName is wrong for some reason
  • Loading branch information
eduard93 authored Jun 13, 2023
2 parents ace7c55 + 09048aa commit 84419c2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sc-list.txt
.vscode/settings.json
8 changes: 6 additions & 2 deletions MDX2JSON/Dashboard.cls
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,12 @@ ClassMethod WidgetControlToProxyObject(Widget As %DeepSee.Dashboard.Widget, Numb
set obj.label = ##class(%DeepSee.UserPortal.Utils).%ResolveText(obj.label)
set obj.source = Widget.name

set filterDataType = ..GetCubeMeasuresDataType(Widget,Number,CubeName,.fDataType)
set obj.targetPropertyDataType = fDataType
set st = ..GetCubeMeasuresDataType(Widget,Number,CubeName,.fDataType)

if (st = $$$OK)
{
set obj.targetPropertyDataType = fDataType
}

set:(obj.target="") obj.target = Widget.name

Expand Down
12 changes: 9 additions & 3 deletions MDX2JSON/Utils.cls
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,11 @@ ClassMethod AddWidget(sWidget As %String, sDashboard As %String, key As %String)
set tWidgets = ##class(%DeepSee.Dashboard.Widget).%New()
set st = ..UpdateWidget(tWidgets, sWidget)

$$$Insert(tDash.widgets, tWidgets)
do tDash.%Save()
if (st = $$$OK) // checking for errors in UpdateWidget
{
$$$Insert(tDash.widgets, tWidgets)
do tDash.%Save()
}

} else {
// Edit exists widget
Expand All @@ -596,7 +599,10 @@ ClassMethod AddWidget(sWidget As %String, sDashboard As %String, key As %String)
}
if (changed '= "") {
set st = ..UpdateWidget(changed, sWidget)
do tDash.%Save()
if (st = $$$OK) // checking for errors in UpdateWidget
{
do tDash.%Save()
}
}
}

Expand Down

0 comments on commit 84419c2

Please sign in to comment.