Skip to content

Commit

Permalink
Merge pull request mrvautin#121 from ScaniaTV/master
Browse files Browse the repository at this point in the history
  • Loading branch information
mrvautin authored Jan 13, 2017
2 parents df93690 + 5395945 commit cf99254
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ router.post('/save_kb', common.restrict, function(req, res){
keywords = '';
}

db.kb.count({'kb_permalink': req.body.frm_kb_permalink, $not: {_id: common.getId(req.body.frm_kb_id)}}, function (err, kb){
db.kb.count({'kb_permalink': req.body.frm_kb_permalink, $not: {_id: common.getId(req.body.frm_kb_id)}, kb_versioned_doc: {$ne: true}}, function (err, kb){
if(kb > 0 && req.body.frm_kb_permalink !== ''){
// permalink exits
req.session.message = req.i18n.__('Permalink already exists. Pick a new one.');
Expand Down

0 comments on commit cf99254

Please sign in to comment.