mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Merge pull request #13178 from appwrite/fix/site-update-wipes-build-runtime
fix(sites): keep stored buildRuntime when update omits it
This commit is contained in:
2 files changed
+6
-1
No files matched your search
@@ -3,6 +3,7 @@
|
||||
namespace Appwrite\Deployment;
|
||||
|
||||
use Ahc\Jwt\JWT;
|
||||
use Appwrite\Extend\Exception;
|
||||
use OpenRuntimes\Orchestrator\Enum\CallbackEvent;
|
||||
use OpenRuntimes\Orchestrator\Enum\ReadFormat;
|
||||
use OpenRuntimes\Orchestrator\Jobs;
|
||||
@@ -506,7 +507,7 @@ readonly class Deployments
|
||||
$key = $resource->getAttribute($resource->getCollection() === 'sites' ? 'buildRuntime' : 'runtime');
|
||||
$runtime = Config::getParam($version === 'v2' ? 'runtimes-v2' : 'runtimes', [])[$key] ?? null;
|
||||
if ($runtime === null) {
|
||||
throw new \Exception('Runtime "' . $key . '" is not supported');
|
||||
throw new Exception(Exception::FUNCTION_RUNTIME_UNSUPPORTED, 'Runtime "' . $key . '" is not supported');
|
||||
}
|
||||
|
||||
return $runtime;
|
||||
|
||||
@@ -195,6 +195,10 @@ class Update extends Base
|
||||
$framework = $site->getAttribute('framework');
|
||||
}
|
||||
|
||||
if (empty($buildRuntime)) {
|
||||
$buildRuntime = $site->getAttribute('buildRuntime');
|
||||
}
|
||||
|
||||
$buildSpecification ??= $site->getAttribute('buildSpecification', APP_SITES_BUILD_SPECIFICATION_DEFAULT);
|
||||
|
||||
$repositoryId = $site->getAttribute('repositoryId', '');
|
||||
|
||||
Reference in new issue
Block a user