File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -185,12 +185,16 @@ body {
185185 kill buffer
186186 throw err
187187 }
188- set newRemote = $Get(%request.Data("remoteRepo",1))
189- // If entry was modified and git repo is initialized, set new remote repo
190- set dir = ##class(%File).NormalizeDirectory(settings.namespaceTemp)
191- if (settings.namespaceTemp '= "") && ##class(%File).DirectoryExists(dir_".git") {
192- if (newRemote '= ##class(SourceControl.Git.Utils).GetRedactedRemote()) {
193- do ##class(SourceControl.Git.Utils).SetConfiguredRemote(newRemote)
188+ // Do not attempt to set a new remote repo if 'remoteRepo' is not actually present in the request
189+ // This may occur for example when settingsUIReadOnly is true where 'remoteRepo' is not user editable
190+ if ($data(%request.Data("remoteRepo",1)) '= 0) {
191+ set newRemote = $Get(%request.Data("remoteRepo",1))
192+ // If entry was modified and git repo is initialized, set new remote repo
193+ set dir = ##class(%File).NormalizeDirectory(settings.namespaceTemp)
194+ if (settings.namespaceTemp '= "") && ##class(%File).DirectoryExists(dir_".git") {
195+ if (newRemote '= ##class(SourceControl.Git.Utils).GetRedactedRemote()) {
196+ do ##class(SourceControl.Git.Utils).SetConfiguredRemote(newRemote)
197+ }
194198 }
195199 }
196200 set successfullySavedSettings = 1
You can’t perform that action at this time.
0 commit comments