Skip to content

Commit

Permalink
remove useless access to the priorityGroup table if partner priorityG…
Browse files Browse the repository at this point in the history
…roupId is null
  • Loading branch information
etameran committed Dec 3, 2017
1 parent 68db229 commit 577c1be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion alpha/lib/model/PartnerPeer.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public static function getPartnerPriorityFactorByPartner($partner)

private static function getPriority(Partner $partner)
{
$priorityGroup = PriorityGroupPeer::retrieveByPK($partner->getPriorityGroupId());
$priorityGroup = $partner->getPriorityGroupId() ? PriorityGroupPeer::retrieveByPK($partner->getPriorityGroupId()) : null;

if(!$priorityGroup)
return PriorityGroup::DEFAULT_PRIORITY;
Expand Down

0 comments on commit 577c1be

Please sign in to comment.