fix(accounts): remove sleeping members from future shifts/rides and notify coordinators#416
Open
tobiascadee wants to merge 9 commits intomainfrom
Open
fix(accounts): remove sleeping members from future shifts/rides and notify coordinators#416tobiascadee wants to merge 9 commits intomainfrom
tobiascadee wants to merge 9 commits intomainfrom
Conversation
BREAKING CHANGES: - Python version upgraded from 3.8 to 3.11 - Django version upgraded from 3.2.25 to 4.2.x Migration changes: - Replace deprecated django.conf.urls.url() with django.urls.path/re_path - Replace deprecated ugettext_lazy with gettext_lazy - Replace django-recaptcha's captcha module with django_recaptcha - Replace mock library with unittest.mock (built-in) - Remove USE_L10N setting (deprecated in Django 4.0, removed in 5.0) Test framework migration: - Migrate from django-nose to pytest-django - Add conftest.py for pytest configuration - Update test commands in Makefile and README - Remove DisableMigrations hack (no longer needed) Dependency updates: - django-bootstrap5: 23.3 → 24.3+ - django-braces: 1.14.0 → 1.16.0+ - django-constance: 2.9.1 → 3.1.0+ (removed [database] extra) - django-debug-toolbar: 3.8.1 → 4.4.0+ - django-extensions: 3.1.2 → 3.2.3+ - django-hijack: 3.2.6 → 3.4.5+ - django-picklefield: 2.1.1 → 3.1+ - django-recaptcha: 3.0.0 → 4.0.0+ - django-tinymce: 4.1.0 → 4.1.0+ - factory-boy: 3.2.1 → 3.3.0+ - gunicorn: 22.0.0 → 22.0.0+ Removed dependencies: - django-nose (replaced with pytest-django) - nose - mock (use stdlib unittest.mock) - fake-factory Code quality: - Fix class-level queryset evaluation in views (use get_queryset method) - Fix GroupmanagerFormView to use get_group_pk() for lazy config access - Apply code formatting consistency throughout codebase Infrastructure: - Update Dockerfile base image from python:3.8-bullseye to python:3.11-bookworm - Update .python-version to 3.11
The empty tests.py placeholder conflicted with the tests/ package, causing pytest import mismatch errors in CI. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…otify coordinators When a member is set to sleeping (is_asleep=True), they are now automatically removed from future distribution shifts and the relevant coordinator is notified by email. For rides, where driver/codriver are non-nullable FKs, the transport coordinator is notified so they can arrange a replacement. Fixes #287 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #287
Summary
is_asleep=True), they are now automatically removed from all future distribution shifts via the M2M relationshipdriver/codriverare non-nullable FKs), the transport coordinator is notified so they can arrange a replacement manuallymail_adminsif no coordinator is assignedImplementation
A
pre_savesignal onVokoUserdetects whenis_asleeptransitions fromFalsetoTrueand triggers the cleanup + notifications. Usesapps.get_model()to avoid circular imports betweenaccounts,distribution, andtransport.Test plan
🤖 Generated with Claude Code