From f9906450b274eb918d331f471d8f239e70df2b78 Mon Sep 17 00:00:00 2001 From: Oliver Pelly Date: Mon, 2 Mar 2026 18:26:51 -0800 Subject: [PATCH] fix --- api/src/DataAccess/Repositories/StudentRepository.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/DataAccess/Repositories/StudentRepository.cs b/api/src/DataAccess/Repositories/StudentRepository.cs index b60fc7b..43f0bc0 100644 --- a/api/src/DataAccess/Repositories/StudentRepository.cs +++ b/api/src/DataAccess/Repositories/StudentRepository.cs @@ -105,7 +105,7 @@ public class StudentRepository { var newGoalId = Guid.NewGuid(); using var db = Connection; - var rowsAffected = await db.ExecuteAsync( + var row = await db.QuerySingleOrDefaultAsync( "sp_Goal_Insert", new { @@ -119,12 +119,12 @@ public class StudentRepository }, commandType: CommandType.StoredProcedure); - if (rowsAffected == 0) return null; + if (row is null) return null; return new StudentGoalItem { GoalId = newGoalId, - GoalParentId = null, + GoalParentId = dto.GoalParentId, Title = dto.Title, Description = dto.Description, Category = dto.Category,