Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0ea21c8 authored by Akhil's avatar Akhil 🙂 Committed by Arnau Vàzquez
Browse files

Check build size before adding to builds array in response

parent 0b56ab40
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -520,7 +520,7 @@
         */
        public function includeInResults($params)
        {
            return $this->isValid($params) && $this->checkRollout();
            return $this->isValid($params) && $this->checkRollout() && $this->getSize() > 0;
        }

        /**
+6 −4
Original line number Diff line number Diff line
@@ -206,14 +206,16 @@
                        
                        if ($build->includeInResults($this->postData['params'])) {
                            array_push($this->builds, $build);
                            if (!empty($this->postData['params']) && strcmp($this->postData['params']['source_incremental'], $build->getIncremental()) == 0) {
                        }
                        
                        $sourceIncremental = isset($this->postData['params']['source_incremental']) ? $this->postData['params']['source_incremental'] : NULL;
                        if ($build->isValid($this->postData['params']) && $sourceIncremental && strcmp($sourceIncremental, $build->getIncremental()) === 0) {
                            $this->currentBuild = $build;
                            $this->logger->info($build->getIncremental().' is the current build');
                        }
                    }
                }
            }
            }
            $this->logger->debug('Total execution  time  of getBuilds in seconds');
        }