From 57b066df587a29ffe6f79db8da9061be839dc7f6 Mon Sep 17 00:00:00 2001 From: Nenad Vujicic Date: Sun, 19 Jan 2025 15:04:32 +0100 Subject: [PATCH] small fix --- app/models/note.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/models/note.rb b/app/models/note.rb index cff065a24e..e6cbf483d8 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -92,7 +92,7 @@ def freshly_closed_until # Return the note's description, unless record is unavailable and # it will be derived from the first comment def description - if self[:user_ip].nil? && self[:user_id].nil? + if user_ip.nil? && user_id.nil? comments.first.body else RichText.new("text", self[:description]) @@ -107,20 +107,20 @@ def author # Return the note's author ID, unless record is unavailable and # it will be derived from the first comment def author_id - if self[:user_ip].nil? && self[:user_id].nil? + if user_ip.nil? && user_id.nil? comments.first.author_id else - self[:user_id] + user_id end end # Return the note's author IP address, unless record is unavailable and # it will be derived from the first comment def author_ip - if self[:user_ip].nil? && self[:user_id].nil? + if user_ip.nil? && user_id.nil? comments.first.author_ip else - self[:user_ip] + user_ip end end