Skip to content

Commit 38382be

Browse files
committed
Validate all publication formats
Issue: documentacao-e-tarefas/desenvolvimento_e_infra#1002 Signed-off-by: Thiago Brasil <thiago@lepidus.com.br>
1 parent 2abe0dc commit 38382be

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

classes/services/ThothBookService.inc.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,12 @@ public function validate($publication)
9090
}
9191

9292
$publicationFormats = DAORegistry::getDAO('PublicationFormatDAO')
93-
->getApprovedByPublicationId($publication->getId())
94-
->toArray();
93+
->getByPublicationId($publication->getId());
9594
foreach ($publicationFormats as $publicationFormat) {
96-
if ($publicationFormat->getIsAvailable()) {
97-
$errors = array_merge(
98-
$errors,
99-
ThothService::publication()->validate($publicationFormat)
100-
);
101-
}
95+
$errors = array_merge(
96+
$errors,
97+
ThothService::publication()->validate($publicationFormat)
98+
);
10299
}
103100

104101
return $errors;

0 commit comments

Comments
 (0)