Skip to content

Commit a866f05

Browse files
committed
context name must be unique for each owner
1 parent 5b27ed1 commit a866f05

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/routes/contexts/versions/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,10 @@ function deepCopyCvFromHelloRunnable (cvKey) {
229229
mw.body().pick('owner'),
230230
runnable.create({}, 'sessionUser'),
231231
// create context requires name
232-
mw.body().set('name', uuid()),
232+
function (req, res, next) {
233+
req.body.name = uuid();
234+
next();
235+
},
233236
runnable.model.createContext('body'),
234237
mw.req().set('newContext', 'runnableResult'),
235238
// make a new context-version

0 commit comments

Comments
 (0)