Commit bd99044e authored by Matt Baer's avatar Matt Baer
Browse files

Fix 500 on tags page

This fixes a panic from a nil user when calling u.IsSuspended().
Instead, this checks and calls IsSuspended() on `owner`.
parent 2899d98c
Pipeline #347 passed with stage
in 3 minutes and 5 seconds
......@@ -905,11 +905,11 @@ func handleViewCollectionTag(app *App, w http.ResponseWriter, r *http.Request) e
// Log the error and just continue
log.Error("Error getting user for collection: %v", err)
if owner.IsSilenced() {
return ErrCollectionNotFound
if !isOwner && u.IsSilenced() {
return ErrCollectionNotFound
displayPage.Suspended = u.IsSilenced()
displayPage.Suspended = owner != nil && owner.IsSilenced()
displayPage.Owner = owner
coll.Owner = displayPage.Owner
// Add more data
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment