Skip to content
Snippets Groups Projects
Verified Commit a2aaf93a authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Merge branch 'master' of edugit.org:AlekSIS/official/AlekSIS

parents c4bd7302 f6f99dc9
No related branches found
No related tags found
No related merge requests found
Pipeline #1968 failed
......@@ -45,7 +45,6 @@ lint:
stage: test
script:
- tox -e lint,security
allow_failure: true
build_dist:
stage: build
......
......@@ -196,8 +196,7 @@ class ExtensibleModel(models.Model, metaclass=_ExtensibleModelBase):
@classmethod
def syncable_fields(cls) -> List[models.Field]:
""" Collect all fields that can be synced on a model """
"""Collect all fields that can be synced on a model."""
return [
field
for field in cls._meta.fields
......@@ -206,18 +205,19 @@ class ExtensibleModel(models.Model, metaclass=_ExtensibleModelBase):
@classmethod
def syncable_fields_choices(cls) -> Tuple[Tuple[str, str]]:
""" Collect all fields that can be synced on a model """
"""Collect all fields that can be synced on a model."""
return tuple(
[(field.name, field.verbose_name or field.name) for field in cls.syncable_fields()]
)
@classmethod
def syncable_fields_choices_lazy(cls) -> Callable[[], Tuple[Tuple[str, str]]]:
""" Collect all fields that can be synced on a model """
"""Collect all fields that can be synced on a model."""
return lazy(cls.syncable_fields_choices, tuple)
def __str__(self) -> str:
return f"{self.__class__.meta.name} {self.pk}"
class Meta:
abstract = True
......
Subproject commit b3b28861982f952d4f0f6ba33c7a5866541e0087
Subproject commit bc3d5ef8d4294919ec28109b61dced73f0351c6a
......@@ -9,7 +9,7 @@ include = ["CHANGELOG.rst", "CODE_OF_CONDUCT.rst", "CONTRIBUTING.rst", "LICENCE.
description = "AlekSIS (School Information System) — Core"
authors = ["Dominik George <dominik.george@teckids.org>", "Julian Leucker <leuckeju@katharineum.de>", "mirabilos <thorsten.glaser@teckids.org>", "Frank Poetzsch-Heffter <p-h@katharineum.de>", "Tom Teichler <tom.teichler@teckids.org>", "Jonathan Weth <wethjo@katharineum.de>", "Hangzhi Yu <yuha@katharineum.de>"]
maintainers = ["Jonathan Weth <wethjo@katharineum.de>", "Dominik George <dominik.george@teckids.org>"}
maintainers = ["Jonathan Weth <wethjo@katharineum.de>", "Dominik George <dominik.george@teckids.org>"]
license = "EUPL-1.2-or-later"
homepage = "https://aleksis.org/"
repository = "https://edugit.org/AlekSIS/official/AlekSIS"
......
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