Skip to content

Commit dd3ebf9

Browse files
use build._Id
1 parent 7c68958 commit dd3ebf9

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/routes/builds.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ app.post('/builds/:id/actions/build',
282282
next();
283283
},
284284
runnable.create({}, 'sessionUser'),
285-
runnable.model.redeployInstance('instance', { json: { build: 'buildId.toString()' } }))),
285+
runnable.model.redeployInstance('instance', { json: { build: 'build._id.toString()' } }))),
286286
// noop is required!! to prevent res.send(404) after the response has already been sent.
287287
noop
288288
);

lib/routes/instances/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ var createSaveAndNetworkContainer = flow.series(
139139
hosts.model.releaseHostLock('ownerUsername', 'instance.name'),
140140
runnable.model.redeployInstance('instance', {
141141
forceDock: 'dockerHost',
142-
json: { build: 'buildId.toString()' }
142+
json: { build: 'build._id.toString()' }
143143
}),
144144
hosts.model.acquireHostLock('ownerUsername', 'instance.name'),
145145
instances.findById('instanceId'))
@@ -282,7 +282,7 @@ app.post('/instances/',
282282
.then(
283283
// deploy build if it is built
284284
runnable.create({}, 'sessionUser'),
285-
runnable.model.redeployInstance('instance', { json: { build: 'buildId.toString()' } }),
285+
runnable.model.redeployInstance('instance', { json: { build: 'build._id.toString()' } }),
286286
mw.res.send(201, 'runnableResult'),
287287
function () {}))
288288
.catch( // dealloc networkIp/hostIp

0 commit comments

Comments
 (0)