diff --git a/biscuit/apps/chronos/tables.py b/biscuit/apps/chronos/tables.py
index ac2bcb18fd54c045286a638c152788d546d539c7..552da7bf5343b02c3bc23094d98472bff2ad7d1c 100644
--- a/biscuit/apps/chronos/tables.py
+++ b/biscuit/apps/chronos/tables.py
@@ -7,13 +7,6 @@ from django_tables2.utils import A
 from .models import LessonPeriod
 
 
-def _css_class_from_lesson_state(record: Optional[LessonPeriod] = None, table: Optional[LessonTable] = None) -> str:
-    if record.get_substitution(table._week):
-        return 'table-warning'
-    else:
-        return ''
-
-
 class LessonsTable(tables.Table):
     class Meta:
         attrs = {'class': 'table table-striped table-bordered table-hover table-responsive-xl'}
@@ -29,3 +22,10 @@ class LessonsTable(tables.Table):
     def __init__(self, week, *args, **kwargs):
         self._week = week
         super().__init__(*args, **kwargs)
+
+
+def _css_class_from_lesson_state(record: Optional[LessonPeriod] = None, table: Optional[LessonTable] = None) -> str:
+    if record.get_substitution(table._week):
+        return 'table-warning'
+    else:
+        return ''