diff options
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index b1ead48caf7..bedcd503724 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -382,9 +382,7 @@ module API expose :author, using: Entities::UserBasic, if: ->(event, options) { event.author } expose :author_username do |event, options| - if event.author - event.author.username - end + event.author&.username end end |