Skip to content

Commit

Permalink
Fix 500 in public activity page (#1901)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethantkoenig authored and appleboy committed Jun 8, 2017
1 parent 9ddc35e commit afe1f1c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion routers/user/home.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,13 @@ func getDashboardContextUser(ctx *context.Context) *models.User {

// retrieveFeeds loads feeds for the specified user
func retrieveFeeds(ctx *context.Context, user *models.User, includePrivate, isProfile bool) {
var requestingID int64
if ctx.User != nil {
requestingID = ctx.User.ID
}
actions, err := models.GetFeeds(models.GetFeedsOptions{
RequestedUser: user,
RequestingUserID: ctx.User.ID,
RequestingUserID: requestingID,
IncludePrivate: includePrivate,
OnlyPerformedBy: isProfile,
})
Expand Down

0 comments on commit afe1f1c

Please sign in to comment.