Merge pull request #5808 from flamerohr/patch-1

Remove double checking for Code
This commit is contained in:
Damian Mooyman 2016-07-19 16:07:36 +12:00 committed by GitHub
commit b82c37acb3

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);
}
}