Skip to content

Commit b7a10e9

Browse files
authored
Fix project status and one_round type check for validation (#644)
1 parent 8feca7c commit b7a10e9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/Goteo/Model/Project.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1593,7 +1593,9 @@ public function save (&$errors = array()) {
15931593
// fail para pasar por todo antes de devolver false
15941594
$fail = false;
15951595

1596-
if ($this->status < self::STATUS_IN_CAMPAIGN && $this->one_round !== 1) {
1596+
if (in_array($this->status, [self::STATUS_DRAFT, self::STATUS_EDITING, self::STATUS_REVIEWING])
1597+
&& $this->one_round != 1)
1598+
{
15971599
$errors[] = Text::get('tooltip-project-rounds-sunset');
15981600
$fail = true;
15991601
}

0 commit comments

Comments
 (0)