From 80828d85d7fe039561da4238c2e069e31d7c1a64 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Fri, 27 Sep 2024 10:47:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E8=AE=B0=E5=BD=95=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user_action.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/models/user_action.rb b/app/models/user_action.rb index 51b492053..846c4e22c 100644 --- a/app/models/user_action.rb +++ b/app/models/user_action.rb @@ -76,10 +76,12 @@ class UserAction < ApplicationRecord private def add_user_info - if user.present? - self.login = user.login - self.email = user.mail - self.phone = user.phone + if self.login.blank? + if user.present? + self.login = user.login + self.email = user.mail + self.phone = user.phone + end end end end