diff --git a/app/adminapi/lists/project/ProjectPlanLists.php b/app/adminapi/lists/project/ProjectPlanLists.php index 506e86914..348a97661 100644 --- a/app/adminapi/lists/project/ProjectPlanLists.php +++ b/app/adminapi/lists/project/ProjectPlanLists.php @@ -65,7 +65,7 @@ class ProjectPlanLists extends BaseAdminDataLists implements ListsSearchInterfac $admin = Admin::field('name')->where('id',$item['project_manage'])->findOrEmpty(); $item['project_name'] = $project['name']; $item['project_code'] = $project['project_code']; - $item['project_manager_name'] = $admin['name']; + $item['project_manager_name'] = !$admin->isEmpty() ? $admin['name'] : ''; return $item; }) ->toArray(); diff --git a/app/adminapi/logic/project/ProjectPlanLogic.php b/app/adminapi/logic/project/ProjectPlanLogic.php index e755fe73e..084f344c1 100644 --- a/app/adminapi/logic/project/ProjectPlanLogic.php +++ b/app/adminapi/logic/project/ProjectPlanLogic.php @@ -121,7 +121,7 @@ class ProjectPlanLogic extends BaseLogic $admin = Admin::field('name')->where('id',$data['project_manage'])->findOrEmpty(); $data['project_name'] = $project['name']; $data['project_code'] = $project['project_code']; - $data['project_manager_name'] = $admin['name']; + $data['project_manager_name'] = !$admin->isEmpty() ? $admin['name'] : ''; return $data; } } \ No newline at end of file