mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-30 21:47:04 -05:00
feat: Implement MFA authentication, add ride statistics model, and update various services, APIs, and tests across the application.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
from typing import Dict
|
||||
|
||||
|
||||
def get_ride_display_changes(changes: Dict) -> Dict:
|
||||
def get_ride_display_changes(changes: dict) -> dict:
|
||||
"""Returns a human-readable version of the ride changes"""
|
||||
field_names = {
|
||||
"name": "Name",
|
||||
@@ -26,7 +25,7 @@ def get_ride_display_changes(changes: Dict) -> Dict:
|
||||
# Format specific fields
|
||||
if field == "status":
|
||||
from .choices import RIDE_STATUSES
|
||||
|
||||
|
||||
choices = {choice.value: choice.label for choice in RIDE_STATUSES}
|
||||
if old_value in choices:
|
||||
old_value = choices[old_value]
|
||||
@@ -34,7 +33,7 @@ def get_ride_display_changes(changes: Dict) -> Dict:
|
||||
new_value = choices[new_value]
|
||||
elif field == "post_closing_status":
|
||||
from .choices import POST_CLOSING_STATUSES
|
||||
|
||||
|
||||
choices = {choice.value: choice.label for choice in POST_CLOSING_STATUSES}
|
||||
if old_value in choices:
|
||||
old_value = choices[old_value]
|
||||
@@ -49,7 +48,7 @@ def get_ride_display_changes(changes: Dict) -> Dict:
|
||||
return display_changes
|
||||
|
||||
|
||||
def get_ride_model_display_changes(changes: Dict) -> Dict:
|
||||
def get_ride_model_display_changes(changes: dict) -> dict:
|
||||
"""Returns a human-readable version of the ride model changes"""
|
||||
field_names = {
|
||||
"name": "Name",
|
||||
|
||||
Reference in New Issue
Block a user