tosdr / edit.tosdr.org

👍👎 A new web app to rate services
https://edit.tosdr.org
GNU Affero General Public License v3.0
213 stars 37 forks source link

500 error on Service page #964

Closed michielbdejong closed 3 years ago

michielbdejong commented 3 years ago

See https://edit.tosdr.org/services/2399

madoleary commented 3 years ago

this is occurring because it's trying to call user.bot? when user is nil. i'll add a condition to check for this edge case, but otherwise, @JustinBack, how would you like to label nil users?

madoleary commented 3 years ago

to be specific, user is nil when it doesn't exist in the database.

madoleary commented 3 years ago

fixed in production

JustinBack commented 3 years ago

this is occurring because it's trying to call user.bot? when user is nil. i'll add a condition to check for this edge case, but otherwise, @JustinBack, how would you like to label nil users?

Then just skip the label for null users, I haven't seen any checks for null users in the other code

JustinBack commented 3 years ago

Nvm that! grafik

I see now that "someone" is a deleted user, so I have changed the behaviour of the username function. Thanks @madoleary for fixing the bug!

JustinBack commented 3 years ago

Added in https://github.com/tosdr/edit.tosdr.org/commit/ae1a03791636b1f4dd46c0100e40c038f8e92081