remodulation du projet en POO et changement de l'organisation des fichiers
This commit is contained in:
+6
-6
@@ -188,7 +188,7 @@ class TeamTryoutsBot(commands.Bot):
|
||||
"""
|
||||
try:
|
||||
# Look up the DB user to get their Discord user ID
|
||||
from app.models import User as DBUser
|
||||
from app.models.models import User as DBUser
|
||||
db_user = DBUser.query.get(user_id)
|
||||
if not db_user:
|
||||
logger.warning(f"DB user {user_id} not found for schedule notification")
|
||||
@@ -234,7 +234,7 @@ class TeamTryoutsBot(commands.Bot):
|
||||
async def handle_one_on_one_approve(self, coach, message_id, request_id, original_message):
|
||||
"""Handle coach approving a One on One request."""
|
||||
try:
|
||||
from app.models import OneOnOneRequest, db
|
||||
from app.models.models import OneOnOneRequest, db
|
||||
from sqlalchemy.orm import joinedload
|
||||
|
||||
request = OneOnOneRequest.query.options(
|
||||
@@ -278,7 +278,7 @@ class TeamTryoutsBot(commands.Bot):
|
||||
async def handle_one_on_one_reject(self, coach, message_id, request_id, original_message):
|
||||
"""Handle coach rejecting a One on One request."""
|
||||
try:
|
||||
from app.models import OneOnOneRequest, db
|
||||
from app.models.models import OneOnOneRequest, db
|
||||
from sqlalchemy.orm import joinedload
|
||||
|
||||
request = OneOnOneRequest.query.options(
|
||||
@@ -336,7 +336,7 @@ class TeamTryoutsBot(commands.Bot):
|
||||
async def handle_attendance_confirm(self, player, message_id, reference_id, original_message):
|
||||
"""Handle player confirming attendance for a match/tryout."""
|
||||
try:
|
||||
from app.models import MatchParticipant, TryoutRegistration, Match, Tryout, db
|
||||
from app.models.models import MatchParticipant, TryoutRegistration, Match, Tryout, db
|
||||
|
||||
request_info = self.pending_requests[message_id]
|
||||
event_type = request_info.get('event_type')
|
||||
@@ -361,7 +361,7 @@ class TeamTryoutsBot(commands.Bot):
|
||||
async def handle_attendance_decline(self, player, message_id, reference_id, original_message):
|
||||
"""Handle player declining attendance for a match/tryout."""
|
||||
try:
|
||||
from app.models import MatchParticipant, TryoutRegistration, Match, Tryout, db
|
||||
from app.models.models import MatchParticipant, TryoutRegistration, Match, Tryout, db
|
||||
|
||||
request_info = self.pending_requests[message_id]
|
||||
event_type = request_info.get('event_type')
|
||||
@@ -471,7 +471,7 @@ class TeamTryoutsBot(commands.Bot):
|
||||
async def send_daily_reminders(self):
|
||||
"""Send daily reminders at 18:00 EDT for events in 24-48 hours."""
|
||||
try:
|
||||
from app.models import Match, Tryout, MatchParticipant, TryoutRegistration, OneOnOneRequest, db
|
||||
from app.models.models import Match, Tryout, MatchParticipant, TryoutRegistration, OneOnOneRequest, db
|
||||
from sqlalchemy.orm import joinedload
|
||||
|
||||
now = datetime.now(self.timezone)
|
||||
|
||||
Reference in New Issue
Block a user