Skip to content

Commit

Permalink
Bug(DesignManager): $subtype doesn't exist if unspecified
Browse files Browse the repository at this point in the history
Fix error occurring when subtype isn't specified at all in a design request.
  • Loading branch information
AW0005 authored Oct 26, 2024
1 parent 433913b commit c463e9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Services/DesignUpdateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ public function saveRequestFeatures($data, $request) {
if (!$species) {
throw new \Exception('Invalid species selected.');
}
if ($subtype && $subtype->species_id != $species->id) {
if (isset($subtype) && $subtype && $subtype->species_id != $species->id) {
throw new \Exception('Subtype does not match the species.');
}

Expand Down

0 comments on commit c463e9f

Please sign in to comment.