Skip to content

Commit

Permalink
Merge pull request #308 from Ohtuilmo/fix/sprint-zero-timelogs
Browse files Browse the repository at this point in the history
Fix bug with sprint number validation
  • Loading branch information
vejol authored May 14, 2024
2 parents 1f059d8 + 079f633 commit c699f9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/controllers/timeLogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const db = require('../models/index')
const { Sequelize } = require('sequelize')

const validateTimeEntry = ({ sprint, date, minutes, description }) => {
if (!sprint || !date || isNaN(parseFloat(minutes)) || !description) {
if (isNaN(sprint) || !date || isNaN(parseFloat(minutes)) || !description) {
return 'All fields must be filled.'
}
if (parseFloat(minutes) <= 0) {
Expand Down

0 comments on commit c699f9e

Please sign in to comment.