James McCool commited on
Commit
7361afe
·
1 Parent(s): c645802

Update salary field references in exposure_spread.py to ensure consistency in salary eligibility checks for player replacements.

Browse files
Files changed (1) hide show
  1. global_func/exposure_spread.py +4 -4
global_func/exposure_spread.py CHANGED
@@ -321,7 +321,7 @@ def exposure_spread(working_frame, exposure_player, exposure_target, comp_salary
321
  suitable_replacements.append(candidate)
322
  else:
323
  # For non-Classic types, check salary eligibility using helper function
324
- current_lineup_salary = working_frame.iloc[row]['Salary']
325
  if check_salary_eligibility(current_lineup_salary, exposure_player, candidate, col, projections_df, type_var, salary_max):
326
  suitable_replacements.append(candidate)
327
 
@@ -346,7 +346,7 @@ def exposure_spread(working_frame, exposure_player, exposure_target, comp_salary
346
  break
347
  else:
348
  # For non-Classic types, check salary eligibility using helper function
349
- current_lineup_salary = working_frame.iloc[row]['Salary']
350
  if check_salary_eligibility(current_lineup_salary, exposure_player, insert_player, col, projections_df, type_var, salary_max):
351
  working_frame.at[row, col] = insert_player
352
  replacement_made = True
@@ -406,10 +406,10 @@ def exposure_spread(working_frame, exposure_player, exposure_target, comp_salary
406
  else:
407
  row_data = working_frame.iloc[row]
408
  working_columns = working_frame.columns
409
- current_lineup_salary = working_frame.iloc[row]['Salary']
410
-
411
  for col in working_columns:
412
  if row_data[col] in comparable_player_list:
 
413
  current_player = row_data[col]
414
 
415
  # Check salary eligibility using helper function
 
321
  suitable_replacements.append(candidate)
322
  else:
323
  # For non-Classic types, check salary eligibility using helper function
324
+ current_lineup_salary = working_frame.iloc[row]['salary']
325
  if check_salary_eligibility(current_lineup_salary, exposure_player, candidate, col, projections_df, type_var, salary_max):
326
  suitable_replacements.append(candidate)
327
 
 
346
  break
347
  else:
348
  # For non-Classic types, check salary eligibility using helper function
349
+ current_lineup_salary = working_frame.iloc[row]['salary']
350
  if check_salary_eligibility(current_lineup_salary, exposure_player, insert_player, col, projections_df, type_var, salary_max):
351
  working_frame.at[row, col] = insert_player
352
  replacement_made = True
 
406
  else:
407
  row_data = working_frame.iloc[row]
408
  working_columns = working_frame.columns
409
+
 
410
  for col in working_columns:
411
  if row_data[col] in comparable_player_list:
412
+ current_lineup_salary = working_frame.iloc[row]['salary']
413
  current_player = row_data[col]
414
 
415
  # Check salary eligibility using helper function