mirror of
https://github.com/appwrite/appwrite
synced 2026-05-21 07:58:55 +00:00
update project rsource
This commit is contained in:
parent
f785602a4d
commit
06c09503df
1 changed files with 7 additions and 1 deletions
|
|
@ -62,7 +62,13 @@ Server::setResource('project', function (Message $message, Database $dbForPlatfo
|
|||
return $project;
|
||||
}
|
||||
|
||||
return $dbForPlatform->getDocument('projects', $project->getId());
|
||||
// NOT all workers need valid DB config so we return empty if this fails
|
||||
try {
|
||||
return $dbForPlatform->getDocument('projects', $project->getId());
|
||||
} catch (\Throwable $e) {
|
||||
return new Document([]);
|
||||
}
|
||||
|
||||
}, ['message', 'dbForPlatform']);
|
||||
|
||||
Server::setResource('dbForProject', function (Cache $cache, Registry $register, Message $message, Document $project, Database $dbForPlatform) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue