feat: Add clear filters functionality and improve product filter options in dashboard
This commit is contained in:
@@ -65,6 +65,13 @@ def get_stats():
|
||||
"""Get dashboard stats summary"""
|
||||
db = get_database()
|
||||
stats = db.get_dashboard_stats()
|
||||
|
||||
# If no check in database, fall back to scraper state's last_check
|
||||
if not stats.get('last_check'):
|
||||
state = scraper_state.get_state()
|
||||
if state.get('last_check'):
|
||||
stats['last_check'] = {'checked_at': state['last_check']}
|
||||
|
||||
return jsonify(stats)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user