Skip to content
Snippets Groups Projects
Commit b252d9f8 authored by Andreas Hubel's avatar Andreas Hubel
Browse files

chore: add some comments

parent 2a94dea0
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,7 @@ repos: ...@@ -48,7 +48,7 @@ repos:
- name: Check for uncreated migrations. - name: Check for uncreated migrations.
id: migrations-check id: migrations-check
language: system language: system
entry: sh -c "src/manage.py makemigrations --check --dry-run" entry: sh -c "pdm manage makemigrations --check --dry-run"
files: "models/.*.py$" files: "models/.*.py$"
types: types:
- python - python
......
...@@ -473,6 +473,7 @@ class ScheduleSource(models.Model): ...@@ -473,6 +473,7 @@ class ScheduleSource(models.Model):
""" """
# for the source id use the provided id, uuid or guid field (in order) # for the source id use the provided id, uuid or guid field (in order)
# TODO move id to end
speaker_id = speaker_info.get('id') or speaker_info.get('uuid') or speaker_info.get('guid') speaker_id = speaker_info.get('id') or speaker_info.get('uuid') or speaker_info.get('guid')
# sanity check: verify that required attributes are present # sanity check: verify that required attributes are present
......
...@@ -15,12 +15,14 @@ class ScheduleJSONSupport(BaseScheduleSupport): ...@@ -15,12 +15,14 @@ class ScheduleJSONSupport(BaseScheduleSupport):
identifier = 'schedule-json' identifier = 'schedule-json'
readonly = True readonly = True
# fmt: off
configuration_fields = { configuration_fields = {
# 'key': (type, default value, mandatory, translation text) # 'key': (type, default value, mandatory, translation text)
'feedback': ('bool', True, False, 'Enable/Disable feedback url generation'), 'feedback': ('bool', True, False, 'Enable/Disable feedback url generation'),
'kind': ('string', 'assembly', False, 'kind of events, either "assembly" or "official" or "sos" or "lightning"'), 'kind': ('string', 'assembly', False, 'kind of events, either "assembly" or "official" or "sos" or "lightning"'),
'headers': ('dict', {}, False, 'HTTP headers to send with the request e.g. Authorization'), 'headers': ('dict', {}, False, 'HTTP headers to send with the request e.g. Authorization'),
} }
# fmt: on
def ready(self): def ready(self):
r = s.head(self.remote_url) r = s.head(self.remote_url)
......
...@@ -19,6 +19,7 @@ class ScheduleJSONFrabSupport(ScheduleJSONSupport): ...@@ -19,6 +19,7 @@ class ScheduleJSONFrabSupport(ScheduleJSONSupport):
identifier = 'schedule-json-frab' identifier = 'schedule-json-frab'
readonly = True readonly = True
# fmt: off
configuration_fields = { configuration_fields = {
'feedback': ('bool', True, False, 'Enable/Disable feedback url generation'), 'feedback': ('bool', True, False, 'Enable/Disable feedback url generation'),
'kind': ('string', 'assembly', False, 'kind of events, either "assembly" or "official" or "sos" or "lightning"'), 'kind': ('string', 'assembly', False, 'kind of events, either "assembly" or "official" or "sos" or "lightning"'),
...@@ -26,6 +27,7 @@ class ScheduleJSONFrabSupport(ScheduleJSONSupport): ...@@ -26,6 +27,7 @@ class ScheduleJSONFrabSupport(ScheduleJSONSupport):
'host': ('string', 'https://frab.cccv.de/', False, 'overwrite Base URL of the schedule, used for feedback page, images, etc.'), 'host': ('string', 'https://frab.cccv.de/', False, 'overwrite Base URL of the schedule, used for feedback page, images, etc.'),
'auth': ('string', None, False, 'login data for frab instance, format: user:password'), 'auth': ('string', None, False, 'login data for frab instance, format: user:password'),
} }
# fmt: on
origin_base_url = None origin_base_url = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment