mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-20 15:29:28 +01:00
Fix the issue about identity on playbook creation
This commit is contained in:
parent
abe19ce636
commit
d7b9cc1f35
@ -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