diff --git a/Assistant/WebApp/Configurators/Edit.hs b/Assistant/WebApp/Configurators/Edit.hs index fc3b8ab0cd..dc25c44550 100644 --- a/Assistant/WebApp/Configurators/Edit.hs +++ b/Assistant/WebApp/Configurators/Edit.hs @@ -37,6 +37,7 @@ import Git.Remote import Remote.Helper.Encryptable (extractCipher) import Types.Crypto import Utility.Gpg +import Annex.UUID import qualified Data.Text as T import qualified Data.Map as M @@ -178,6 +179,9 @@ postEditNewCloudRepositoryR uuid = xmppNeeded >> editForm True uuid editForm :: Bool -> UUID -> Handler Html editForm new uuid = page "Edit repository" (Just Configuration) $ do mremote <- liftAnnex $ Remote.remoteFromUUID uuid + when (mremote == Nothing) $ + whenM ((/=) uuid <$> liftAnnex getUUID) $ + error "unknown remote" curr <- liftAnnex $ getRepoConfig uuid mremote liftAnnex $ checkAssociatedDirectory curr mremote ((result, form), enctype) <- liftH $