diff --git a/api/application/controllers/Sales_PD_Controller.php b/api/application/controllers/Sales_PD_Controller.php index 3b357e26..95c707d6 100644 --- a/api/application/controllers/Sales_PD_Controller.php +++ b/api/application/controllers/Sales_PD_Controller.php @@ -727,7 +727,7 @@ class Sales_PD_Controller extends REST_Controller { $section_data = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('sales_pd_id' => $records['sales_pd_id'],'isactive' => 1,'section_id' => $records['section_id']),SALESPD_SECTION_DATA); //print_r( json_decode($section_data[0]['section_data'],true));die(); - if($records['section_id'] == 9) + if($records['section_id'] == 9 && count($section_data)) { $all_sales_pd_images = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $records['sales_pd_id'],'img_name !=' => 'satellite','isactive' => 1),SALEPD_DOCS); //print_r($all_sales_pd_images);die();