diff --git a/dataCollector/dataCollector.php b/dataCollector/dataCollector.php
index b26f7aa..9b8a6ec 100644
--- a/dataCollector/dataCollector.php
+++ b/dataCollector/dataCollector.php
@@ -55,8 +55,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
echo "POST Request received.
";
if(property_exists($entityBodyObject, "id")) {
- saveToDatabase(objectToArray($entityBodyObject, $entityBody), $conn);
- echo "
Data saved.
";
+ if(! ($entityBodyObject->countWatchM + $entityBodyObject->countWatchW + $entityBodyObject->countWatchD === 0)){
+ saveToDatabase(objectToArray($entityBodyObject, $entityBody), $conn);
+ echo "
Data saved.
";
+ }
}
} elseif($_SERVER['REQUEST_METHOD'] === 'GET') {
download_xlsxFile(getFromDatabase());