Remove double checking for Code

This commit is contained in:
Chris Joe 2016-07-14 16:47:48 +12:00 committed by GitHub
parent af5a539c9a
commit 291c527174

View File

@ -406,7 +406,7 @@ class Group extends DataObject {
// The "Code" attribute is usually treated as a more permanent identifier than database IDs
// in custom application logic, so can't be changed after its first set.
if(!$this->Code && $this->Title != _t('SecurityAdmin.NEWGROUP',"New Group")) {
if(!$this->Code) $this->setCode($this->Title);
$this->setCode($this->Title);
}
}