Fix null input vari

This commit is contained in:
Samuele E. Locatelli (W11-AI)
2026-03-18 18:50:37 +01:00
parent 58f130e059
commit d2de5f4657
4 changed files with 25 additions and 1 deletions
@@ -24,6 +24,9 @@ namespace EgwCoreLib.Lux.Data.Repository.Job
public async Task<bool> DeleteAsync(JobStepModel rec2del)
{
// Add validation for null entity
if (rec2del == null) return false;
await using var dbCtx = await CreateContextAsync();
// Wrap in transaction for atomicity (multi-row update + delete)
@@ -84,6 +87,9 @@ namespace EgwCoreLib.Lux.Data.Repository.Job
public async Task<bool> MoveAsync(JobStepModel selRec, bool moveUp)
{
// Add validation for null entity
if (selRec == null) return false;
await using var dbCtx = await CreateContextAsync();
// Wrap in transaction for atomicity (multi-row update)