Skip to content

Commit

Permalink
fix: null ects on courses (#1161)
Browse files Browse the repository at this point in the history
fix: null ects on courses
  • Loading branch information
limwa authored Feb 26, 2024
2 parents 4e81088 + 157de90 commit 4fe7adf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion uni/lib/view/course_units/widgets/course_unit_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ class CourseUnitCard extends GenericCard {
padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 5),
child: Row(
children: [
Text("${courseUnit.ects.toString().replaceAll('.0', '')} ECTS"),
if (courseUnit.ects != null)
Text("${courseUnit.ects.toString().replaceAll('.0', '')} ECTS"),
const Spacer(),
Text(courseUnit.grade ?? '-'),
],
Expand Down

0 comments on commit 4fe7adf

Please sign in to comment.