mirror of
https://github.com/standardebooks/web.git
synced 2025-07-09 16:20:27 -04:00
Correctly pull reviewer of active projects
This commit is contained in:
parent
d942f4642b
commit
6261eee67f
2 changed files with 3 additions and 3 deletions
|
@ -780,12 +780,12 @@ final class Project{
|
|||
/**
|
||||
* @throws Exceptions\ProjectNotFoundException If the `Project` can't be found.
|
||||
*/
|
||||
public static function GetByIdentifierAndIsInProgress(?string $identifier): Project{
|
||||
public static function GetByIdentifierAndIsActive(?string $identifier): Project{
|
||||
if($identifier === null){
|
||||
throw new Exceptions\ProjectNotFoundException();
|
||||
}
|
||||
|
||||
return Db::Query('SELECT Projects.* from Ebooks inner join Projects using (EbookId) where Ebooks.Identifier = ? and Projects.Status = ?', [$identifier, Enums\ProjectStatusType::InProgress], Project::class)[0] ?? throw new Exceptions\ProjectNotFoundException();
|
||||
return Db::Query('SELECT Projects.* from Ebooks inner join Projects using (EbookId) where Ebooks.Identifier = ? and Projects.Status in (?, ?, ?)', [$identifier, Enums\ProjectStatusType::InProgress, Enums\ProjectStatusType::AwaitingReview, Enums\ProjectStatusType::Reviewed], Project::class)[0] ?? throw new Exceptions\ProjectNotFoundException();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue