Skip to content
Snippets Groups Projects
Commit b85b29dd authored by Julian's avatar Julian
Browse files

fallback for classes

parent 26fd1d34
No related branches found
No related tags found
1 merge request!86Merge school-apps
......@@ -7,11 +7,18 @@ from martor.models import MartorField
from schoolapps.settings import BASE_DIR
from timetable.m2l import convert_markdown_2_latex
from untisconnect.api import get_all_classes, format_classes
from untisconnect.models import Class
classes = get_all_classes()
class_choices = [(x.id, x.name) for x in classes]
from untisconnect.models import Terms
try:
from untisconnect.api import get_all_classes, format_classes
from untisconnect.models import Class
classes = get_all_classes()
class_choices = [(x.id, x.name) for x in classes]
except Terms.DoesNotExist:
classes = []
class_choices = []
class HintClass(models.Model):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment