Преглед изворни кода

如果是巨量账户级,推广id和巨量账户唯一绑定

liuzejian пре 2 година
родитељ
комит
de01f4ce39
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      modules/Tuiguang/Http/Controllers/PromotionController.php

+ 1 - 1
modules/Tuiguang/Http/Controllers/PromotionController.php

@@ -133,7 +133,7 @@ class PromotionController extends CatchController
                 ->where(['is_enabled' => 1, 'callback_type' => $request->input('callback_type'),
                     'callback_config_id' => $request->input('callback_config_id')])
                 ->first();
-            if($exist->id != $request->input('id')) {
+            if($exist && $exist->id != $request->input('id')) {
                 CommonBusinessException::throwError(Errors::JULIANG_ACCOUNT_PROMOTION_UNIQUE);
             }
         }