Fix on default type check
Change-Id: I5f80a890dba5420160864adf7bbd33c9acf8b6d7 Signed-off-by: smarcet <smarcet@gmail.com>
This commit is contained in:
parent
a29dbf15e7
commit
20facbb1b2
|
@ -106,7 +106,7 @@ final class SummitBadgeTypeService extends AbstractService
|
||||||
}
|
}
|
||||||
// if we dont have a default or the default is already the current one
|
// if we dont have a default or the default is already the current one
|
||||||
// and we want to clear the default force it
|
// 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
|
// force default
|
||||||
throw new ValidationException("You must define a default badge type.");
|
throw new ValidationException("You must define a default badge type.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue