@@ -115,7 +115,8 @@ func home(ctx *context.Context, viewRepositories bool) {
115115 return
116116 }
117117
118- ctx .Data ["HasPrivateProfileReadme" ] = viewRepositories || ! prepareOrgProfileReadme (ctx , prepareResult )
118+ // if no profile readme, it still means "view repositories"
119+ ctx .Data ["PageIsViewRepositories" ] = viewRepositories || ! prepareOrgProfileReadme (ctx , prepareResult )
119120
120121 var (
121122 repos []* repo_model.Repository
@@ -181,7 +182,7 @@ func prepareOrgProfileReadme(ctx *context.Context, prepareResult *shared_user.Pr
181182
182183 readmeBytes , err := readmeBlob .GetBlobContent (setting .UI .MaxDisplayFileSize )
183184 if err != nil {
184- log .Error ("failed to GetBlobContent for %q profile (view as %q) readme: %v" , ctx . ContextUser . Name , viewAs , err )
185+ log .Error ("failed to GetBlobContent for profile %q (view as %q) readme: %v" , profileRepo . FullName () , viewAs , err )
185186 return false
186187 }
187188
@@ -190,7 +191,7 @@ func prepareOrgProfileReadme(ctx *context.Context, prepareResult *shared_user.Pr
190191 })
191192 ctx .Data ["ProfileReadmeContent" ], err = markdown .RenderString (rctx , readmeBytes )
192193 if err != nil {
193- log .Error ("failed to GetBlobContent for %q profile (view as %q) readme: %v" , ctx . ContextUser . Name , viewAs , err )
194+ log .Error ("failed to GetBlobContent for profile %q (view as %q) readme: %v" , profileRepo . FullName () , viewAs , err )
194195 return false
195196 }
196197 ctx .Data ["IsViewingOrgAsMember" ] = viewAsMember
0 commit comments