Skip to content

Commit

Permalink
urgently patch customer resolving on waypoints, fix is only resolve c…
Browse files Browse the repository at this point in the history
…ustomer if required attributes filled
  • Loading branch information
roncodes committed Jul 2, 2024
1 parent 024761d commit 2f06596
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fleetbase/fleetops-api",
"version": "0.5.0",
"version": "0.5.1",
"description": "Fleet & Transport Management Extension for Fleetbase",
"keywords": [
"fleetbase-extension",
Expand Down
2 changes: 1 addition & 1 deletion extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Fleet-Ops",
"version": "0.5.0",
"version": "0.5.1",
"description": "Fleet & Transport Management Extension for Fleetbase",
"repository": "https://github.com/fleetbase/fleetops",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fleetbase/fleetops-engine",
"version": "0.5.0",
"version": "0.5.1",
"description": "Fleet & Transport Management Extension for Fleetbase",
"fleetbase": {
"route": "fleet-ops"
Expand Down
4 changes: 2 additions & 2 deletions server/src/Models/Payload.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public function setWaypoints($waypoints = [])
}

// Handle customer assosciation for waypoint
if (is_array($attributes) && array_key_exists('customer_uuid', $attributes) && array_key_exists('customer_type', $attributes)) {
if (is_array($attributes) && Utils::notEmpty($attributes['customer_uuid']) && Utils::notEmpty($attributes['customer_type'])) {
$customerTypeNamespace = Utils::getMutationType($attributes['customer_type']);
$customerExists = app($customerTypeNamespace)->where('uuid', $attributes['customer_uuid'])->exists();
if ($customerExists) {
Expand Down Expand Up @@ -371,7 +371,7 @@ public function insertWaypoints($waypoints = [])
}

// Handle customer assosciation for waypoint
if (is_array($attributes) && array_key_exists('customer_uuid', $attributes) && array_key_exists('customer_type', $attributes)) {
if (is_array($attributes) && Utils::notEmpty($attributes['customer_uuid']) && Utils::notEmpty($attributes['customer_type'])) {
$customerTypeNamespace = Utils::getMutationType($attributes['customer_type']);
$customerExists = app($customerTypeNamespace)->where('uuid', $attributes['customer_uuid'])->exists();
if ($customerExists) {
Expand Down

0 comments on commit 2f06596

Please sign in to comment.