From ca0c7124c12c5305d2fd196d63f025701289f591 Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Sun, 23 Feb 2020 15:38:22 +0000 Subject: [PATCH] In C2S Offer{Ticket} on local project, insert a TicketUnderProject record --- src/Vervis/API.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Vervis/API.hs b/src/Vervis/API.hs index ebd01a4..aa26a05 100644 --- a/src/Vervis/API.hs +++ b/src/Vervis/API.hs @@ -1140,16 +1140,20 @@ offerTicketC shrUser summary audience offer@(Offer ticket uTarget) = runExceptT , localTicketDiscuss = did , localTicketFollowers = fsid } - insert_ TicketProjectLocal + tplid <- insert TicketProjectLocal { ticketProjectLocalTicket = tid , ticketProjectLocalProject = jid , ticketProjectLocalAccept = obiidAccept } - insert_ TicketAuthorLocal + talid <- insert TicketAuthorLocal { ticketAuthorLocalTicket = ltid , ticketAuthorLocalAuthor = pidAuthor , ticketAuthorLocalOpen = obiid } + insert_ TicketUnderProject + { ticketUnderProjectProject = tplid + , ticketUnderProjectAuthor = talid + } --insertMany_ $ map (TicketDependency tid) tidsDeps -- insert_ $ Follow pidAuthor fsid False True return ltid