File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,13 @@ def process_game_data(game_data):
213
213
if game_time is None :
214
214
game_time = "TBD"
215
215
216
+ is_home_game = "Ithaca" in city
217
+
218
+ # make sure cornell is first in score breakdown - switch order on home games
219
+ # do this before branching
220
+ if game_data ["score_breakdown" ] and is_home_game :
221
+ game_data ["score_breakdown" ] = game_data ["score_breakdown" ][::- 1 ]
222
+
216
223
# finds any existing game with the same key fields regardless of time
217
224
curr_game = GameService .get_game_by_key_fields (
218
225
city ,
@@ -253,10 +260,5 @@ def process_game_data(game_data):
253
260
"score_breakdown" : game_data ["score_breakdown" ],
254
261
"utc_date" : utc_date_str
255
262
}
256
-
257
- # make sure cornell is first in score breakdown - switch order on home games
258
- if game_data ["score_breakdown" ]:
259
- if city == "Ithaca" :
260
- game_data ["score_breakdown" ] = game_data ["score_breakdown" ][::- 1 ]
261
263
262
264
GameService .create_game (game_data )
You can’t perform that action at this time.
0 commit comments