Commit 02dee7072bdce8b75aa77a32cf065e973354ee8b
1 parent
fe0d370162
Exists in
master
fixed autocomplete issue; ty for tests
Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff
flashcards/models.py
View file @
02dee70
... | ... | @@ -196,6 +196,7 @@ |
196 | 196 | @property |
197 | 197 | def lecture_times(self): |
198 | 198 | lecture_periods = self.lectureperiod_set.all() |
199 | + if not lecture_periods.exists(): return '' | |
199 | 200 | return ''.join(map(lambda x: x.weekday_letter, lecture_periods)) + ' ' + lecture_periods[0].short_start_time |
200 | 201 | |
201 | 202 | @property |