Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MBetterc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mbetter
MBetterc
Commits
b5bb674b
Commit
b5bb674b
authored
Feb 20, 2026
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add detailed logging to fixtures API to debug match processing
parent
80a5421b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
50 deletions
+59
-50
routes.py
mbetterclient/web_dashboard/routes.py
+59
-50
No files found.
mbetterclient/web_dashboard/routes.py
View file @
b5bb674b
...
@@ -10777,18 +10777,23 @@ def get_overlay_fixtures():
...
@@ -10777,18 +10777,23 @@ def get_overlay_fixtures():
# Combine matches: yesterday first (if any incomplete), then today
# Combine matches: yesterday first (if any incomplete), then today
all_matches
=
[]
all_matches
=
[]
if
yesterday_incomplete_matches
:
if
yesterday_incomplete_matches
:
logger
.
debug
(
f
"
Found {len(yesterday_incomplete_matches)} incomplete matches from yesterday - including them"
)
logger
.
info
(
f
"[FIXTURES API]
Found {len(yesterday_incomplete_matches)} incomplete matches from yesterday - including them"
)
all_matches
.
extend
(
yesterday_incomplete_matches
)
all_matches
.
extend
(
yesterday_incomplete_matches
)
all_matches
.
extend
(
today_matches
)
all_matches
.
extend
(
today_matches
)
# Limit to 5 matches total
# Limit to 5 matches total
display_matches
=
all_matches
[:
5
]
display_matches
=
all_matches
[:
5
]
logger
.
info
(
f
"[FIXTURES API] Processing {len(display_matches)} matches for display"
)
fixtures_data
=
[]
fixtures_data
=
[]
for
match
in
display_matches
:
for
i
,
match
in
enumerate
(
display_matches
):
try
:
logger
.
info
(
f
"[FIXTURES API] Processing match {i+1}: id={match.id}, match_number={match.match_number}"
)
# Get outcomes from MatchOutcomeModel
# Get outcomes from MatchOutcomeModel
outcomes
=
session
.
query
(
MatchOutcomeModel
)
.
filter_by
(
match_id
=
match
.
id
)
.
all
()
outcomes
=
session
.
query
(
MatchOutcomeModel
)
.
filter_by
(
match_id
=
match
.
id
)
.
all
()
logger
.
info
(
f
"[FIXTURES API] Found {len(outcomes)} outcomes for match {match.id}"
)
# Format outcomes as array expected by template
# Format outcomes as array expected by template
outcomes_array
=
[]
outcomes_array
=
[]
...
@@ -10827,8 +10832,12 @@ def get_overlay_fixtures():
...
@@ -10827,8 +10832,12 @@ def get_overlay_fixtures():
}
}
}
}
fixtures_data
.
append
(
match_data
)
fixtures_data
.
append
(
match_data
)
logger
.
info
(
f
"[FIXTURES API] Successfully processed match {match.id}"
)
except
Exception
as
match_error
:
logger
.
error
(
f
"[FIXTURES API] Error processing match {match.id}: {match_error}"
)
continue
logger
.
debug
(
f
"Retrieved {len(fixtures_data)} matches from database (yesterday: {len(yesterday_incomplete_matches)}, today: {len(today_matches)})
"
)
logger
.
info
(
f
"[FIXTURES API] Returning {len(fixtures_data)} matches
"
)
return
jsonify
(
fixtures_data
)
return
jsonify
(
fixtures_data
)
finally
:
finally
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment