Fix tags and rule groups.

This commit is contained in:
James Cole
2021-03-11 06:29:07 +01:00
parent 75c8ec7c0a
commit 625e31d053
9 changed files with 158 additions and 43 deletions

View File

@@ -87,8 +87,6 @@ trait AppendsLocationData
$longitudeKey = $this->getLocationKey($prefix, 'longitude');
$latitudeKey = $this->getLocationKey($prefix, 'latitude');
$zoomLevelKey = $this->getLocationKey($prefix, 'zoom_level');
$hasLocationKey = $this->getLocationKey($prefix, 'has_location');
$hasLocation = $this->boolean($hasLocationKey) || true === ($data['has_location'] ?? false);
$isValidPOST = $this->isValidPost($prefix);
$isValidPUT = $this->isValidPUT($prefix);
$isValidEmptyPUT = $this->isValidEmptyPUT($prefix);
@@ -202,10 +200,11 @@ trait AppendsLocationData
return (
null === $this->get($longitudeKey)
&& null === $this->get($latitudeKey)
&& null === $this->has($zoomLevelKey))
&& (('PUT' === $this->method() && $this->routeIs('*.update'))
&& null === $this->get($zoomLevelKey))
&& ('PUT' === $this->method()
|| ('POST' === $this->method() && $this->routeIs('*.update'))
);
}
}

View File

@@ -265,6 +265,9 @@ trait ConvertsDataTypes
if (null === $value) {
return false;
}
if ('' === $value) {
return false;
}
if ('true' === $value) {
return true;
}