mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
N°931 Fix bug when max allowed items set to 1
This commit is contained in:
@@ -264,7 +264,7 @@ class ormSet
|
||||
*/
|
||||
public function Add($oItem)
|
||||
{
|
||||
if (($this->iLimit != 0) && ($this->Count() === $this->iLimit))
|
||||
if (($this->iLimit != 0) && ($this->Count() > $this->iLimit))
|
||||
{
|
||||
throw new CoreException("Maximum number of items ({$this->iLimit}) reached for {$this->sClass}:{$this->sAttCode}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user