fix: throws null error on edit rollcall group
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user