fix(audit): centraliser l'horloge UTC
CI - Security, Lint & Tests / validate (push) Failing after 16m22s
CI - Security, Lint & Tests / validate (push) Failing after 16m22s
This commit is contained in:
+4
-2
@@ -65,6 +65,8 @@ from discord.ext import commands
|
||||
from dotenv import load_dotenv
|
||||
from sqlalchemy.exc import SQLAlchemyError
|
||||
|
||||
from app.time_utils import utc_now_naive
|
||||
|
||||
load_dotenv()
|
||||
DISCORD_BOT_TOKEN = os.getenv('DISCORD_BOT_TOKEN')
|
||||
|
||||
@@ -780,7 +782,7 @@ class TeamTryoutsBot(commands.Bot):
|
||||
coach_obj = request.coach
|
||||
|
||||
request.status = 'approved'
|
||||
request.responded_at = datetime.utcnow()
|
||||
request.responded_at = utc_now_naive()
|
||||
except SQLAlchemyError:
|
||||
db.session.rollback()
|
||||
logger.exception('Could not read One on One request %s to approve it', request_id)
|
||||
@@ -875,7 +877,7 @@ class TeamTryoutsBot(commands.Bot):
|
||||
|
||||
try:
|
||||
request.status = 'rejected'
|
||||
request.responded_at = datetime.utcnow()
|
||||
request.responded_at = utc_now_naive()
|
||||
if refusal_note:
|
||||
request.coach_rejection_message = refusal_note
|
||||
except SQLAlchemyError:
|
||||
|
||||
Reference in New Issue
Block a user