Commit d9dc3180 by Juan Camilo Montoya

a first contribution to fix TNL-4204 byte sized bug

parent b406a70f
...@@ -440,8 +440,7 @@ class CourseInfoModule(CourseInfoFields, HtmlModuleMixin): ...@@ -440,8 +440,7 @@ class CourseInfoModule(CourseInfoFields, HtmlModuleMixin):
return self.data return self.data
else: else:
course_updates = [item for item in self.items if item.get('status') == self.STATUS_VISIBLE] course_updates = [item for item in self.items if item.get('status') == self.STATUS_VISIBLE]
course_updates.sort(key=lambda item: CourseInfoModule.safe_parse_date(item['date']), reverse=True) course_updates.sort(key=lambda item: (datetime.strptime(item['date'], '%B %d, %Y'), item['id']), reverse=True)
context = { context = {
'visible_updates': course_updates[:3], 'visible_updates': course_updates[:3],
'hidden_updates': course_updates[3:], 'hidden_updates': course_updates[3:],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment