feat: Implement initial schema and add various API, service, and management command enhancements across the application.

This commit is contained in:
pacnpal
2026-01-01 15:13:01 -05:00
parent c95f99ca10
commit b243b17af7
413 changed files with 11164 additions and 17433 deletions

View File

@@ -36,9 +36,7 @@ def check_overdue_closings() -> dict:
# Query rides that need transition
today = timezone.now().date()
overdue_rides = Ride.objects.filter(
status="CLOSING", closing_date__lte=today
).select_for_update()
overdue_rides = Ride.objects.filter(status="CLOSING", closing_date__lte=today).select_for_update()
processed = 0
succeeded = 0
@@ -109,9 +107,7 @@ def _get_system_user():
logger.info("Created system user for automated tasks")
except Exception as e:
# If creation fails, try to get moderator or admin user
logger.warning(
"Failed to create system user, falling back to moderator: %s", str(e)
)
logger.warning("Failed to create system user, falling back to moderator: %s", str(e))
try:
system_user = User.objects.filter(is_staff=True).first()
if not system_user: