From 1c07a0e9d390af666953e4f838ced60a8c26f080 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 29 Aug 2019 10:44:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E6=95=B0=E6=8D=AE=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 5ba8667f5..12759ea4d 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -139,7 +139,7 @@ class User < ApplicationRecord has_many :videos, dependent: :destroy # 客户管理 - belongs_to :partner + belongs_to :partner, optional: true # Groups and active users scope :active, lambda { where(status: STATUS_ACTIVE) }