From ae149e46244a2dfe8ea5bd9c418d4ca957038f43 Mon Sep 17 00:00:00 2001 From: "Daniel J. Summers" Date: Thu, 23 Apr 2020 10:07:23 -0500 Subject: [PATCH] Cherry-pick fix for #42 --- src/MyPrayerJournal.Api/Data.fs | 6 ++++-- src/MyPrayerJournal.Api/MyPrayerJournal.Api.fsproj | 12 ++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/MyPrayerJournal.Api/Data.fs b/src/MyPrayerJournal.Api/Data.fs index 9d2c112..0c50846 100644 --- a/src/MyPrayerJournal.Api/Data.fs +++ b/src/MyPrayerJournal.Api/Data.fs @@ -126,8 +126,8 @@ module Data = .ToListAsync() return jrnl + |> Seq.map (fun r -> r.history <- []; r.notes <- []; r) |> List.ofSeq - |> List.map (fun r -> r.history <- []; r.notes <- []; r) } /// Save changes in the current document session @@ -166,7 +166,9 @@ module Data = .Where(fun x -> x.Id = (RequestId.toString reqId) && x.userId = userId) .ProjectInto() .FirstOrDefaultAsync () - return Option.fromObject req + return + Option.fromObject req + |> Option.map (fun r -> r.history <- []; r.notes <- []; r) } /// Update the recurrence for a request diff --git a/src/MyPrayerJournal.Api/MyPrayerJournal.Api.fsproj b/src/MyPrayerJournal.Api/MyPrayerJournal.Api.fsproj index 3d7a599..8bdd62f 100644 --- a/src/MyPrayerJournal.Api/MyPrayerJournal.Api.fsproj +++ b/src/MyPrayerJournal.Api/MyPrayerJournal.Api.fsproj @@ -14,17 +14,17 @@ - + - - - - + + + + - +