diff --git a/src/Vervis/Migration.hs b/src/Vervis/Migration.hs index b78bc60..9b970ec 100644 --- a/src/Vervis/Migration.hs +++ b/src/Vervis/Migration.hs @@ -2539,8 +2539,11 @@ changes hLocal ctx = (Just $ \ (Entity topicTemp (CollabTopicLocal447 collabTemp)) -> do collabs <- selectList [] [] for_ collabs $ \ (Entity topicID topic) -> do + maybeLocal <- getKeyBy $ UniqueCollabTopicLocal447 $ collabTopicLocalAccept447Collab topic localID <- - insert $ CollabTopicLocal447 $ collabTopicLocalAccept447Collab topic + case maybeLocal of + Nothing -> error "No CollabTopicLocal for this Collab" + Just l -> return l update topicID [CollabTopicLocalAccept447CollabNew =. localID] delete topicTemp