mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2026-01-02 01:47:04 -05:00
feat: Implement initial schema and add various API, service, and management command enhancements across the application.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user