Skip to content

Commit

Permalink
Remove lemma check from wordform generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjcamilleri committed Apr 16, 2020
1 parent 15112e9 commit 99a4e10
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions routes/wordforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,13 @@ router.post('/generate/:paradigm/:lexeme_id?',
var lexeme_id = req.params.lexeme_id
if (lexeme_id && req.body.commit === true) {
// Insert into DB
var lemma = req.body.lemma // 'ipparkja'
req.db.get('lexemes').findOne(lexeme_id, function (err, data) {
if (err) {
res.status(400).send('find error')
res.status(400).send(err)
return
}
if (!data) {
res.status(400).send('lexeme ' + lexeme_id + ' not found')
return
}
if (data.lemma !== lemma) {
res.status(400).send('Lemma mis-match: ' + lemma + ' / ' + data.lemma)
res.status(400).send('Lexeme ' + lexeme_id + ' not found')
return
}

Expand Down

0 comments on commit 99a4e10

Please sign in to comment.