Skip to content

Commit 1e008c8

Browse files
committed
Disable only_this_court when no court has been assigned
1 parent cbbb4ae commit 1e008c8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tptools/ext/squore/feed.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ def _make_sections_for_courts(
7777
courtnamepolicy: CourtNamePolicy,
7878
matchfeedparams: MatchFeedParams,
7979
) -> list[MatchesSection]:
80+
if matchfeedparams.court is None and matchfeedparams.only_this_court:
81+
logger.info("Disabling only_this_court for device without assigned court")
82+
matchfeedparams.only_this_court = False
83+
8084
sections = []
8185
for matchcourt, sqmatches in matches_by_court.items():
8286
if matchcourt is None:

0 commit comments

Comments
 (0)