fix: throws null error on edit rollcall group

This commit is contained in:
MahanCh
2025-07-01 16:36:40 +03:30
parent 79e5d98ac6
commit 4818fa32f4

View File

@@ -342,7 +342,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
double salary = command.Salary.MoneyToDouble();
var weeklyOffDays = command.OffDayOfWeeks.Select(x => new WeeklyOffDay(x)).ToList();
var weeklyOffDays = command.OffDayOfWeeks?.Select(x => new WeeklyOffDay(x)).ToList()??[];
var entity = new CustomizeWorkshopGroupSettings(command.Name, salary, command.CustomizeWorkshopSettingId, shiftCollection, workshopSettings.FridayPay, workshopSettings.OverTimePay,
workshopSettings.BaseYearsPay, workshopSettings.BonusesPay, workshopSettings.NightWorkPay, workshopSettings.MarriedAllowance,
@@ -822,7 +822,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
var notSelectedEmployeeSettings = employeeSettings.Where(x => !selectedEmployeesIds.Contains(x.EmployeeId));
var weeklyOffDays = command.OffDayOfWeeks.Select(x => new WeeklyOffDay(x)).ToList();
var weeklyOffDays = command.OffDayOfWeeks?.Select(x => new WeeklyOffDay(x)).ToList() ?? [];
using var transaction = new TransactionScope();
entity.EditSimpleAndOverwriteOnEmployee(command.Name, selectedEmployeesIds, groupSettingsShifts, command.WorkshopShiftStatus,