From e30e28c279fad7df9823e08eff3aaa5436a9afd8 Mon Sep 17 00:00:00 2001 From: "Daniel J. Summers" Date: Sat, 19 Jun 2021 22:58:17 -0400 Subject: [PATCH] Fix skill deletion (#20) --- src/JobsJobsJobs/Directory.Build.props | 4 ++-- src/JobsJobsJobs/Server/Data/ProfileExtensions.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/JobsJobsJobs/Directory.Build.props b/src/JobsJobsJobs/Directory.Build.props index d7dd852..1410d4b 100644 --- a/src/JobsJobsJobs/Directory.Build.props +++ b/src/JobsJobsJobs/Directory.Build.props @@ -2,7 +2,7 @@ net5.0 enable - 1.0.0.0 - 1.0.0.0 + 1.0.1.0 + 1.0.1.0 diff --git a/src/JobsJobsJobs/Server/Data/ProfileExtensions.cs b/src/JobsJobsJobs/Server/Data/ProfileExtensions.cs index cac0194..159fb38 100644 --- a/src/JobsJobsJobs/Server/Data/ProfileExtensions.cs +++ b/src/JobsJobsJobs/Server/Data/ProfileExtensions.cs @@ -68,7 +68,7 @@ namespace JobsJobsJobs.Server.Data if (!ids.Any()) return; db.Skills.RemoveRange(await db.Skills.AsNoTracking() - .Where(s => !ids.Contains(s.Id)).ToListAsync() + .Where(s => s.CitizenId == citizenId && !ids.Contains(s.Id)).ToListAsync() .ConfigureAwait(false)); }