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

Merge branch 'master' into...

Merge branch 'master' into 64-make-it-possible-to-take-over-the-data-of-the-first-lesson-for-double-lessons
parents 4b1e0a9c e08075f9
No related branches found
No related tags found
1 merge request!79Resolve "Carry over the data of the first lesson for double (or triple, ...) lessons"
Pipeline #3393 passed
...@@ -47,6 +47,7 @@ def mark_absent( ...@@ -47,6 +47,7 @@ def mark_absent(
week=wanted_week.week, week=wanted_week.week,
defaults={"absent": absent, "excused": excused, "excuse_type": excuse_type}, defaults={"absent": absent, "excused": excused, "excuse_type": excuse_type},
) )
personal_note.groups_of_person.set(self.member_of.all())
if remarks: if remarks:
if personal_note.remarks: if personal_note.remarks:
...@@ -83,12 +84,14 @@ def get_personal_notes(self, wanted_week: CalendarWeek): ...@@ -83,12 +84,14 @@ def get_personal_notes(self, wanted_week: CalendarWeek):
) )
# Create all missing personal notes # Create all missing personal notes
PersonalNote.objects.bulk_create( new_personal_notes = [
[ PersonalNote(person=person, lesson_period=self, week=wanted_week.week)
PersonalNote(person=person, lesson_period=self, week=wanted_week.week) for person in missing_persons
for person in missing_persons ]
] PersonalNote.objects.bulk_create(new_personal_notes)
)
for personal_note in new_personal_notes:
personal_note.groups_of_person.set(personal_note.person.member_of.all())
return PersonalNote.objects.select_related("person").filter( return PersonalNote.objects.select_related("person").filter(
lesson_period=self, week=wanted_week.week lesson_period=self, week=wanted_week.week
......
...@@ -68,7 +68,7 @@ extras = ["phonenumbers"] ...@@ -68,7 +68,7 @@ extras = ["phonenumbers"]
version = ">=3.0,<4.0" version = ">=3.0,<4.0"
[package.dependencies.django-two-factor-auth] [package.dependencies.django-two-factor-auth]
extras = ["sms", "call", "phonenumbers", "yubikey"] extras = ["yubikey", "call", "phonenumbers", "sms"]
version = ">=1.11.0,<2.0.0" version = ">=1.11.0,<2.0.0"
[package.dependencies.dynaconf] [package.dependencies.dynaconf]
...@@ -1103,6 +1103,14 @@ zipp = ">=0.5" ...@@ -1103,6 +1103,14 @@ zipp = ">=0.5"
docs = ["sphinx", "rst.linker"] docs = ["sphinx", "rst.linker"]
testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] testing = ["packaging", "pep517", "importlib-resources (>=1.3)"]
[[package]]
category = "dev"
description = "iniconfig: brain-dead simple config-ini parsing"
name = "iniconfig"
optional = false
python-versions = "*"
version = "1.0.1"
[[package]] [[package]]
category = "dev" category = "dev"
description = "A Python utility / library to sort Python imports." description = "A Python utility / library to sort Python imports."
...@@ -1365,24 +1373,25 @@ description = "pytest: simple powerful testing with Python" ...@@ -1365,24 +1373,25 @@ description = "pytest: simple powerful testing with Python"
name = "pytest" name = "pytest"
optional = false optional = false
python-versions = ">=3.5" python-versions = ">=3.5"
version = "5.4.3" version = "6.0.1"
[package.dependencies] [package.dependencies]
atomicwrites = ">=1.0" atomicwrites = ">=1.0"
attrs = ">=17.4.0" attrs = ">=17.4.0"
colorama = "*" colorama = "*"
iniconfig = "*"
more-itertools = ">=4.0.0" more-itertools = ">=4.0.0"
packaging = "*" packaging = "*"
pluggy = ">=0.12,<1.0" pluggy = ">=0.12,<1.0"
py = ">=1.5.0" py = ">=1.8.2"
wcwidth = "*" toml = "*"
[package.dependencies.importlib-metadata] [package.dependencies.importlib-metadata]
python = "<3.8" python = "<3.8"
version = ">=0.12" version = ">=0.12"
[package.extras] [package.extras]
checkqa-mypy = ["mypy (v0.761)"] checkqa_mypy = ["mypy (0.780)"]
testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"]
[[package]] [[package]]
...@@ -1906,14 +1915,6 @@ brotli = ["brotlipy (>=0.6.0)"] ...@@ -1906,14 +1915,6 @@ brotli = ["brotlipy (>=0.6.0)"]
secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "pyOpenSSL (>=0.14)", "ipaddress"] secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "pyOpenSSL (>=0.14)", "ipaddress"]
socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7,<2.0)"] socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7,<2.0)"]
[[package]]
category = "dev"
description = "Measures the displayed width of unicode strings in a terminal"
name = "wcwidth"
optional = false
python-versions = "*"
version = "0.2.5"
[[package]] [[package]]
category = "main" category = "main"
description = "Character encoding aliases for legacy web content" description = "Character encoding aliases for legacy web content"
...@@ -1948,7 +1949,7 @@ docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] ...@@ -1948,7 +1949,7 @@ docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"]
testing = ["jaraco.itertools", "func-timeout"] testing = ["jaraco.itertools", "func-timeout"]
[metadata] [metadata]
content-hash = "7d00a0fea6b654993db4ac9290d12a20122963db0ca9d96c2a642a82c8789c0d" content-hash = "4345c57e5e3244ce0bbdc8ad8a7cffa385fe33b7da1b5fc87ffe32dabf45c5a9"
python-versions = "^3.7" python-versions = "^3.7"
[metadata.files] [metadata.files]
...@@ -2320,6 +2321,10 @@ importlib-metadata = [ ...@@ -2320,6 +2321,10 @@ importlib-metadata = [
{file = "importlib_metadata-1.7.0-py2.py3-none-any.whl", hash = "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"}, {file = "importlib_metadata-1.7.0-py2.py3-none-any.whl", hash = "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"},
{file = "importlib_metadata-1.7.0.tar.gz", hash = "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83"}, {file = "importlib_metadata-1.7.0.tar.gz", hash = "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83"},
] ]
iniconfig = [
{file = "iniconfig-1.0.1-py3-none-any.whl", hash = "sha256:80cf40c597eb564e86346103f609d74efce0f6b4d4f30ec8ce9e2c26411ba437"},
{file = "iniconfig-1.0.1.tar.gz", hash = "sha256:e5f92f89355a67de0595932a6c6c02ab4afddc6fcdc0bfc5becd0d60884d3f69"},
]
isort = [ isort = [
{file = "isort-5.2.2-py3-none-any.whl", hash = "sha256:aea484023188ef1c38256dd24afa96e914adafe3a911a1786800a74e433006d1"}, {file = "isort-5.2.2-py3-none-any.whl", hash = "sha256:aea484023188ef1c38256dd24afa96e914adafe3a911a1786800a74e433006d1"},
{file = "isort-5.2.2.tar.gz", hash = "sha256:96b27045e3187b9bdde001143b79f9b10a462f372bff7062302818013b6c86f3"}, {file = "isort-5.2.2.tar.gz", hash = "sha256:96b27045e3187b9bdde001143b79f9b10a462f372bff7062302818013b6c86f3"},
...@@ -2541,8 +2546,8 @@ pyparsing = [ ...@@ -2541,8 +2546,8 @@ pyparsing = [
{file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"},
] ]
pytest = [ pytest = [
{file = "pytest-5.4.3-py3-none-any.whl", hash = "sha256:5c0db86b698e8f170ba4582a492248919255fcd4c79b1ee64ace34301fb589a1"}, {file = "pytest-6.0.1-py3-none-any.whl", hash = "sha256:8b6007800c53fdacd5a5c192203f4e531eb2a1540ad9c752e052ec0f7143dbad"},
{file = "pytest-5.4.3.tar.gz", hash = "sha256:7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8"}, {file = "pytest-6.0.1.tar.gz", hash = "sha256:85228d75db9f45e06e57ef9bf4429267f81ac7c0d742cc9ed63d09886a9fe6f4"},
] ]
pytest-cov = [ pytest-cov = [
{file = "pytest-cov-2.10.0.tar.gz", hash = "sha256:1a629dc9f48e53512fcbfda6b07de490c374b0c83c55ff7a1720b3fccff0ac87"}, {file = "pytest-cov-2.10.0.tar.gz", hash = "sha256:1a629dc9f48e53512fcbfda6b07de490c374b0c83c55ff7a1720b3fccff0ac87"},
...@@ -2767,10 +2772,6 @@ urllib3 = [ ...@@ -2767,10 +2772,6 @@ urllib3 = [
{file = "urllib3-1.25.10-py2.py3-none-any.whl", hash = "sha256:e7983572181f5e1522d9c98453462384ee92a0be7fac5f1413a1e35c56cc0461"}, {file = "urllib3-1.25.10-py2.py3-none-any.whl", hash = "sha256:e7983572181f5e1522d9c98453462384ee92a0be7fac5f1413a1e35c56cc0461"},
{file = "urllib3-1.25.10.tar.gz", hash = "sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a"}, {file = "urllib3-1.25.10.tar.gz", hash = "sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a"},
] ]
wcwidth = [
{file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"},
{file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"},
]
webencodings = [ webencodings = [
{file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"},
{file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"},
......
...@@ -29,7 +29,7 @@ sphinx = "^3.0" ...@@ -29,7 +29,7 @@ sphinx = "^3.0"
sphinxcontrib-django = "^0.5.0" sphinxcontrib-django = "^0.5.0"
sphinx-autodoc-typehints = "^1.7" sphinx-autodoc-typehints = "^1.7"
django-stubs = "^1.1" django-stubs = "^1.1"
pytest = "^5.3" pytest = "^6.0"
pytest-django = "^3.7" pytest-django = "^3.7"
pytest-django-testing-postgresql = "^0.1" pytest-django-testing-postgresql = "^0.1"
selenium = "^3.141.0" selenium = "^3.141.0"
......
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