04/28 Updated sprint 4 & 5
This commit is contained in:
+4
-2
@@ -6,7 +6,7 @@ Dashboard and related API routes.
|
||||
Routes: /dashboard, /project/<id>/qr-codes, /dashboard/search,
|
||||
/api/dashboard/stats, /api/dashboard/realtime
|
||||
"""
|
||||
from flask import Blueprint, render_template, request, redirect, flash, session, jsonify, url_for
|
||||
from flask import abort, Blueprint, render_template, request, redirect, flash, session, jsonify, url_for
|
||||
from datetime import datetime, timedelta, date, time
|
||||
|
||||
from extensions import db, logger_handler
|
||||
@@ -84,7 +84,9 @@ def project_qr_codes(project_id):
|
||||
"""
|
||||
try:
|
||||
# Get the project
|
||||
project = Project.query.get_or_404(project_id)
|
||||
project = db.session.get(Project, project_id)
|
||||
if project is None:
|
||||
abort(404)
|
||||
|
||||
# Get search parameters from URL
|
||||
search_name = request.args.get('search_name', '').strip()
|
||||
|
||||
Reference in New Issue
Block a user