Skip to content

Commit 56b1270

Browse files
authored
Bugfix - fix bug of image regex deployment (#125)
fix bug of image regex deployment
1 parent 1849bf4 commit 56b1270

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/rest-server/config/rest_server.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,10 @@ def run(self):
7575
'schedule-port-start', 'schedule-port-end', 'sql-max-connection',
7676
'hived-computing-device-envs', 'log-server', 'log_azure_storage_account',
7777
'log_azure_storage_account_key', 'log_azure_storage_container_name',
78-
'code-restriction'
78+
'code-restriction', 'image-regex'
7979
]:
80-
service_object_model[k] = self.service_configuration[k]
80+
if k in self.service_configuration:
81+
service_object_model[k] = self.service_configuration[k]
8182

8283
# default-computing-device-type only works in default scheduler.
8384
# If hived scheduler is enabled, it will be ignored.

src/rest-server/src/middlewares/v2/protocol.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const protocolValidate = (protocolYAML) => {
119119
}
120120

121121
if (imageRegex) {
122-
const imageName = getImageName(protocolObj.prerequisites);
122+
const imageName = getImageName(prerequisites);
123123
// Check if the imageName matches the imageRegex
124124
if (!imageName) {
125125
throw createError(

0 commit comments

Comments
 (0)