Skip to content

Commit

Permalink
Merge pull request #1132 from UniversityOfHelsinkiCS/trunk
Browse files Browse the repository at this point in the history
Minor bug fixes πŸ¦ŸπŸ‘ and a migration 🧨
  • Loading branch information
Rochet2 authored Jul 16, 2019
2 parents 46560ab + 7f3e84a commit 04bb80a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
up: async (queryInterface) => {
return queryInterface.sequelize.transaction(async transaction => {
await queryInterface.dropTable('mandatory_course_labels', { transaction })
})
},
down: async () => {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class SearchForm extends Component {
this.fetchStatisticsFromUrlParams()
} else {
this.props.clearCourses()
this.props.clearCourseStats()
}
}

Expand Down Expand Up @@ -237,6 +238,7 @@ SearchForm.propTypes = {
getSemesters: func.isRequired,
getCourseStats: func.isRequired,
clearCourses: func.isRequired,
clearCourseStats: func.isRequired,
matchingCourses: arrayOf(shape({})).isRequired,
years: arrayOf(shape({})).isRequired,
isLoading: bool.isRequired,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class StudentDetails extends Component {
const sample = [student]
const dates = flattenDeep(student.courses.map(c => c.date)).map(d => new Date(d).getTime())
sample.maxCredits = student.credits
sample.maxDate = Math.max(...dates)
sample.maxDate = dates.length > 0 ? Math.max(...dates) : new Date().getTime()
sample.minDate = new Date(student.started).getTime()
return (
<CreditAccumulationGraphHighCharts
Expand Down

0 comments on commit 04bb80a

Please sign in to comment.