Fix #5181: Old post versions have null ratings which causes a KeyError.
This commit is contained in:
@@ -151,7 +151,7 @@ class PostVersion < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def pretty_rating
|
def pretty_rating
|
||||||
Post::RATINGS.fetch(rating)
|
Post::RATINGS[rating] # XXX some old post versions have nil ratings.
|
||||||
end
|
end
|
||||||
|
|
||||||
def changes
|
def changes
|
||||||
|
|||||||
Reference in New Issue
Block a user