not allowed to delete default country
This commit is contained in:
@@ -47,6 +47,10 @@ class Country extends BaseCountry
|
|||||||
|
|
||||||
public function preDelete(ConnectionInterface $con = null)
|
public function preDelete(ConnectionInterface $con = null)
|
||||||
{
|
{
|
||||||
|
if($this->getByDefault()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$this->dispatchEvent(TheliaEvents::BEFORE_DELETECOUNTRY, new CountryEvent($this));
|
$this->dispatchEvent(TheliaEvents::BEFORE_DELETECOUNTRY, new CountryEvent($this));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user