Commit 6f9cd630 authored by oleg.pahhomov's avatar oleg.pahhomov

SA0140-609 | delete role

parent fdef06b4
......@@ -47,7 +47,9 @@ public class RoleDashboardAdminService {
}
public void saveRole(DashboardAdminResponse dashboard) {
if (dashboard.getMainRole() != null) {
if (dashboard.getMainRole() == null) {
roleDashboardRepository.deleteByDashboard(dashboard.getId());
} else {
List<RoleDashboard> byDashboard = roleDashboardRepository.findByDashboard(dashboard.getId());
RoleDashboard existingRoleDashboard = StatListUtil.firstOrNull(byDashboard);
if (dashboard.getMainRole().getCode() == ClassifierCode.EHAK) {
......
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