Fix on default type check

Change-Id: I5f80a890dba5420160864adf7bbd33c9acf8b6d7
Signed-off-by: smarcet <smarcet@gmail.com>
This commit is contained in:
smarcet 2021-07-16 13:38:03 -03:00
parent a29dbf15e7
commit 20facbb1b2
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ final class SummitBadgeTypeService extends AbstractService
}
// if we dont have a default or the default is already the current one
// and we want to clear the default force it
if(!$is_default && ( is_null($formerDefault) || $formerDefault->getId() == $formerDefault->getId())){
if(!$is_default && ( is_null($formerDefault) || $badge_type->getId() == $formerDefault->getId())){
// force default
throw new ValidationException("You must define a default badge type.");
}