diff --git a/src/Entity/Data.php b/src/Entity/Data.php index 2c291bc3..8a2c01ff 100644 --- a/src/Entity/Data.php +++ b/src/Entity/Data.php @@ -107,7 +107,7 @@ public function setPollutant(int $pollutant): Data public function getProvider(): ?string { - return $this->station->getProvider(); + return $this->station?->getProvider(); } public function isIndexable(): bool