Commit 8fc1cdc8 authored by oleg.pahhomov's avatar oleg.pahhomov

SA0140-537 | simplify save

parent a3fe3634
......@@ -126,7 +126,7 @@ public class DashboardSaveService {
private UserWidget mapFromDashboardWidget(DashboardWidget dashboardWidget, StatUser user, Dashboard dashboard, List<Long> selectedWidgets) {
UserWidget userWidget = existingOrNewDashboardWidget(dashboardWidget, user, dashboard);
userWidget.setSelected(selectedWidgets.contains(dashboardWidget.getWidget()));
userWidget.setSelected(true);
int indexOf = selectedWidgets.indexOf(dashboardWidget.getWidget());
userWidget.setOrderNr(indexOf == -1 ? null : indexOf);
return userWidget;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment