Skip to content
Snippets Groups Projects
Commit 69906b74 authored by Monica Cellio's avatar Monica Cellio
Browse files

rubocop (TIL: I thought the first & would stop the rest of the expression on nil)

parent 63d4127d
No related merge requests found
......@@ -31,7 +31,7 @@ class CommunityUser < ApplicationRecord
end
def latest_warning
mod_warnings&.order(created_at: 'desc').first.created_at
mod_warnings&.order(created_at: 'desc')&.first&.created_at
end
# Calculation functions for privilege scores
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment