Fix linting

This commit is contained in:
Lorenz Padberg 2023-07-11 11:23:36 +02:00
parent 9911117df5
commit bf3582d338
7 changed files with 22 additions and 16 deletions

View File

@ -246,4 +246,4 @@
"settings": { "settings": {
"emailNotifications": "Email Benachrichtigungen" "emailNotifications": "Email Benachrichtigungen"
} }
} }

View File

@ -247,4 +247,4 @@
"settings": { "settings": {
"emailNotifications": "Notifications par e-mail" "emailNotifications": "Notifications par e-mail"
} }
} }

View File

@ -247,4 +247,4 @@
"settings": { "settings": {
"emailNotifications": "Notifiche e-mail" "emailNotifications": "Notifiche e-mail"
} }
} }

View File

@ -18,7 +18,6 @@ onMounted(async () => {
const allDueDates = courseSessionsStore.allDueDates(); const allDueDates = courseSessionsStore.allDueDates();
const getNextStepLink = (courseSession: CourseSession) => { const getNextStepLink = (courseSession: CourseSession) => {
courseSessionsStore.allCourseSessions.forEach((courseSession) => {});
return computed(() => { return computed(() => {
if (courseSessionsStore.hasCockpit(courseSession)) { if (courseSessionsStore.hasCockpit(courseSession)) {
return courseSession.cockpit_url; return courseSession.cockpit_url;

View File

@ -42,7 +42,10 @@ from vbv_lernwelt.course_session.models import (
CourseSessionAttendanceCourse, CourseSessionAttendanceCourse,
) )
from vbv_lernwelt.learnpath.models import ( from vbv_lernwelt.learnpath.models import (
Circle, LearningContentAssignment, LearningContentAttendanceCourse, ) Circle,
LearningContentAssignment,
LearningContentAttendanceCourse,
)
from vbv_lernwelt.learnpath.tests.learning_path_factories import ( from vbv_lernwelt.learnpath.tests.learning_path_factories import (
CircleFactory, CircleFactory,
LearningContentAssignmentFactory, LearningContentAssignmentFactory,
@ -128,9 +131,15 @@ def create_test_course(include_uk=True, include_vv=True, with_sessions=False):
) )
course = Course.objects.get(id=COURSE_TEST_ID) course = Course.objects.get(id=COURSE_TEST_ID)
for cs in CourseSession.objects.filter(course_id=COURSE_TEST_ID): for cs in CourseSession.objects.filter(course_id=COURSE_TEST_ID):
for assignment in LearningContentAssignment.objects.descendant_of(course.coursepage): for assignment in LearningContentAssignment.objects.descendant_of(
course.coursepage
):
create_course_session_assignment(cs, assignment) create_course_session_assignment(cs, assignment)
for (attendance_course) in LearningContentAttendanceCourse.objects.descendant_of(course.coursepage): for (
attendance_course
) in LearningContentAttendanceCourse.objects.descendant_of(
course.coursepage
):
create_course_session_attendance_course(cs, attendance_course) create_course_session_attendance_course(cs, attendance_course)
return course return course

View File

@ -6,18 +6,18 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('duedate', '0007_auto_20230703_1741'), ("duedate", "0007_auto_20230703_1741"),
] ]
operations = [ operations = [
migrations.AlterField( migrations.AlterField(
model_name='duedate', model_name="duedate",
name='start', name="start",
field=models.DateTimeField(blank=True, db_index=True, null=True), field=models.DateTimeField(blank=True, db_index=True, null=True),
), ),
migrations.AlterField( migrations.AlterField(
model_name='duedate', model_name="duedate",
name='url', name="url",
field=models.CharField(blank=True, default='', max_length=1024), field=models.CharField(blank=True, default="", max_length=1024),
), ),
] ]

View File

@ -29,9 +29,7 @@ class DueDate(models.Model):
def Meta(self): def Meta(self):
ordering = ["start", "end"] ordering = ["start", "end"]
verbose_name = _("Termin") verbose_name = _("Termin")
help = ( help = "The end date is mandatory. You can set the start date if you want to have a deadline with a duration."
"The end date is mandatory. You can set the start date if you want to have a deadline with a duration."
)
def __str__(self): def __str__(self):
start_str = self.start.strftime("%Y-%m-%d %H:%M") if self.start else "-" start_str = self.start.strftime("%Y-%m-%d %H:%M") if self.start else "-"