fix editing unknown uuid
Before, assumed Nothing when getting remote meant it was the local repo, and showed the edit form for that.
This commit is contained in:
parent
564da7946c
commit
dfe3162bf5
1 changed files with 4 additions and 0 deletions
|
@ -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 $
|
||||
|
|
Loading…
Add table
Reference in a new issue