Fix #5181: Old post versions have null ratings which causes a KeyError.

This commit is contained in:
evazion
2022-05-22 23:50:45 -05:00
parent 81bd86d202
commit 7786fbaca6

View File

@@ -151,7 +151,7 @@ class PostVersion < ApplicationRecord
end
def pretty_rating
Post::RATINGS.fetch(rating)
Post::RATINGS[rating] # XXX some old post versions have nil ratings.
end
def changes