mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-20 15:29:28 +01:00
Merge pull request #29 from rmessner/issue-playbook-creation
Fix Identity not being attached to a playbook on creation
This commit is contained in:
commit
6d6085a2d5
@ -39,9 +39,9 @@ function addPlaybook (req, res) {
|
||||
vault_password: req.body.vault_password
|
||||
})
|
||||
|
||||
if (req.body.credential && req.body.credential.length > 0) {
|
||||
if (typeof req.body.identity == 'string' && req.body.identity.length > 0) {
|
||||
try {
|
||||
playbook.credential = mongoose.Types.ObjectId(req.body.credential)
|
||||
playbook.identity = mongoose.Types.ObjectId(req.body.identity);
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user