Skip to content

Commit

Permalink
Fix Job Viewer deep link regression (introduced in ubccr#733).
Browse files Browse the repository at this point in the history
The Update Job Viewer API ubccr#733 pull request introduced check to confirm
that the jobref is an int. This check was too restrictive since the
jobref will be a numeric string when loading from a url.
  • Loading branch information
jpwhite4 authored and jtpalmer committed Feb 15, 2019
1 parent c904af0 commit 4f46b71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/Rest/Controllers/WarehouseControllerProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,7 @@ private function getJobByPrimaryKey(Application $app, \XDUser $user, $realm, $se
throw new \DataWarehouse\Query\Exceptions\AccessDeniedException;
}

if (isset($searchparams['jobref']) && is_int($searchparams['jobref'])) {
if (isset($searchparams['jobref']) && is_numeric($searchparams['jobref'])) {
$params = array(
'primary_key' => $searchparams['jobref']
);
Expand Down

0 comments on commit 4f46b71

Please sign in to comment.