fix(qa): resolver diagnosticos estaticos, sincronizacion moodle y actualizar docs v3.6.4
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from flask import Blueprint, request, jsonify, g
|
||||
from datetime import datetime, timedelta, date
|
||||
from datetime import datetime, timedelta, date, timezone
|
||||
from pydantic import ValidationError
|
||||
|
||||
from app import db
|
||||
@@ -20,7 +20,7 @@ def list_reservations():
|
||||
end_str = request.args.get('end_date')
|
||||
classroom_id = request.args.get('classroom_id', type=int)
|
||||
|
||||
now = datetime.utcnow()
|
||||
now = datetime.now(timezone.utc).replace(tzinfo=None)
|
||||
try:
|
||||
start_dt = datetime.strptime(start_str, '%Y-%m-%d') if start_str else now.replace(hour=0, minute=0, second=0)
|
||||
except ValueError:
|
||||
@@ -42,7 +42,7 @@ def list_reservations():
|
||||
is_virt = bool(r.is_virtual or (r.classroom and r.classroom.is_virtual))
|
||||
if hide_virtual and is_virt:
|
||||
continue
|
||||
if floor and r.classroom and str(r.classroom.floor).strip().lower() != str(floor).strip().lower():
|
||||
if floor and r.classroom and str(r.classroom.floor or '').strip().lower() != floor.strip().lower():
|
||||
continue
|
||||
if shift and r.shift and shift.lower() not in r.shift.lower():
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user