Skip to content
Snippets Groups Projects
Verified Commit df9366d3 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge branch 'master' into...

Merge branch 'master' into 122-next_lesson-doesn-t-correctly-work-with-changing-validity-ranges-and-probably-also-year-changes
parents 47cbec5a 56930943
No related branches found
No related tags found
1 merge request!144Resolve "next_lesson doesn't correctly work with changing validity ranges and probably also year changes"
Pipeline #6718 passed
...@@ -11,5 +11,9 @@ include: ...@@ -11,5 +11,9 @@ include:
file: /ci/build/dist.yml file: /ci/build/dist.yml
- project: "AlekSIS/official/AlekSIS" - project: "AlekSIS/official/AlekSIS"
file: "/ci/deploy/trigger_dist.yml" file: "/ci/deploy/trigger_dist.yml"
- project: "AlekSIS/official/AlekSIS"
file: "/ci/docker/image.yml"
- project: "AlekSIS/official/AlekSIS" - project: "AlekSIS/official/AlekSIS"
file: /ci/publish/pypi.yml file: /ci/publish/pypi.yml
- project: "AlekSIS/official/AlekSIS"
file: /ci/deploy/review.yml
ARG APPS="AlekSIS-App-Chronos"
FROM registry.edugit.org/aleksis/official/aleksis-core:master
...@@ -41,6 +41,7 @@ class Migration(migrations.Migration): ...@@ -41,6 +41,7 @@ class Migration(migrations.Migration):
), ),
], ],
options={ options={
"default_permissions": (),
"permissions": ( "permissions": (
("view_all_timetables", "Can view all timetables"), ("view_all_timetables", "Can view all timetables"),
("view_timetable_overview", "Can view timetable overview"), ("view_timetable_overview", "Can view timetable overview"),
......
...@@ -83,7 +83,7 @@ def lesson_periods_as_teacher(self): ...@@ -83,7 +83,7 @@ def lesson_periods_as_teacher(self):
@Person.method @Person.method
def lessons_on_day(self, day: date): def lessons_on_day(self, day: date):
"""Get all lessons of this person (either as participant or teacher) on the given day.""" """Get all lessons of this person (either as participant or teacher) on the given day."""
return LessonPeriod.objects.order_by("period__period").on_day(day).filter_from_person(self) return LessonPeriod.objects.on_day(day).filter_from_person(self).order_by("period__period")
@Person.method @Person.method
......
...@@ -48,7 +48,11 @@ from aleksis.apps.chronos.mixins import ( ...@@ -48,7 +48,11 @@ from aleksis.apps.chronos.mixins import (
from aleksis.apps.chronos.util.date import get_current_year from aleksis.apps.chronos.util.date import get_current_year
from aleksis.apps.chronos.util.format import format_m2m from aleksis.apps.chronos.util.format import format_m2m
from aleksis.core.managers import CurrentSiteManagerWithoutMigrations from aleksis.core.managers import CurrentSiteManagerWithoutMigrations
from aleksis.core.mixins import ExtensibleModel, SchoolTermRelatedExtensibleModel from aleksis.core.mixins import (
ExtensibleModel,
GlobalPermissionModel,
SchoolTermRelatedExtensibleModel,
)
from aleksis.core.models import DashboardWidget, SchoolTerm from aleksis.core.models import DashboardWidget, SchoolTerm
from aleksis.core.util.core_helpers import has_person from aleksis.core.util.core_helpers import has_person
...@@ -1044,7 +1048,7 @@ class ExtraLesson( ...@@ -1044,7 +1048,7 @@ class ExtraLesson(
verbose_name_plural = _("Extra lessons") verbose_name_plural = _("Extra lessons")
class ChronosGlobalPermissions(ExtensibleModel): class ChronosGlobalPermissions(GlobalPermissionModel):
class Meta: class Meta:
managed = False managed = False
permissions = ( permissions = (
......
This diff is collapsed.
...@@ -31,7 +31,7 @@ secondary = true ...@@ -31,7 +31,7 @@ secondary = true
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.7" python = "^3.7"
calendarweek = "^0.4.6" calendarweek = "^0.5.0"
aleksis-core = "^2.0a3.dev0" aleksis-core = "^2.0a3.dev0"
[tool.poetry.dev-dependencies] [tool.poetry.dev-dependencies]
......
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