File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,10 @@ func (web *WebController) PoliciesPage(c *gin.Context) {
9595}
9696
9797func (web * WebController ) AddPolicyPage (c * gin.Context ) {
98+ orgId := c .GetHeader (middleware .ORGANISATION_ID_KEY )
99+
98100 if c .Request .Method == "GET" {
101+
99102 message := ""
100103 projects , done := models .DB .GetProjectsFromContext (c , middleware .ORGANISATION_ID_KEY )
101104 if ! done {
@@ -140,7 +143,7 @@ func (web *WebController) AddPolicyPage(c *gin.Context) {
140143
141144 log .Printf ("repo: %v\n " , project .RepoFullName )
142145
143- repo , err := models .DB .GetRepoByFullName (middleware . ORGANISATION_ID_KEY , project .RepoFullName )
146+ repo , err := models .DB .GetRepoByFullName (orgId , project .RepoFullName )
144147 if err != nil {
145148 log .Printf ("Failed to fetch repo by name: %v, %v\n " , project .RepoFullName , err )
146149 message := "Failed to create a policy"
You can’t perform that action at this time.
0 commit comments