fix: replace integer comparisons on boolean fields with True/False (#69)
All checks were successful
Build Docker Image / build (pull_request) Successful in 2m16s
All checks were successful
Build Docker Image / build (pull_request) Successful in 2m16s
Closes #69 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
da679b6d1a
commit
c1d1b4be51
@ -435,10 +435,10 @@ class Team(BaseModel):
|
||||
active_roster[pos] += 1
|
||||
|
||||
all_drops = Transaction.select_season(Current.latest().season).where(
|
||||
(Transaction.oldteam == self) & (Transaction.week == current.week + 1) & (Transaction.cancelled == 0)
|
||||
(Transaction.oldteam == self) & (Transaction.week == current.week + 1) & (Transaction.cancelled == False)
|
||||
)
|
||||
all_adds = Transaction.select_season(Current.latest().season).where(
|
||||
(Transaction.newteam == self) & (Transaction.week == current.week + 1) & (Transaction.cancelled == 0)
|
||||
(Transaction.newteam == self) & (Transaction.week == current.week + 1) & (Transaction.cancelled == False)
|
||||
)
|
||||
|
||||
for move in all_drops:
|
||||
@ -496,10 +496,10 @@ class Team(BaseModel):
|
||||
|
||||
sil_team = Team.get_season(f'{self.abbrev}SIL', current.season)
|
||||
all_drops = Transaction.select_season(Current.latest().season).where(
|
||||
(Transaction.oldteam == sil_team) & (Transaction.week == current.week + 1) & (Transaction.cancelled == 0)
|
||||
(Transaction.oldteam == sil_team) & (Transaction.week == current.week + 1) & (Transaction.cancelled == False)
|
||||
)
|
||||
all_adds = Transaction.select_season(Current.latest().season).where(
|
||||
(Transaction.newteam == sil_team) & (Transaction.week == current.week + 1) & (Transaction.cancelled == 0)
|
||||
(Transaction.newteam == sil_team) & (Transaction.week == current.week + 1) & (Transaction.cancelled == False)
|
||||
)
|
||||
|
||||
for move in all_drops:
|
||||
@ -557,10 +557,10 @@ class Team(BaseModel):
|
||||
|
||||
lil_team = Team.get_season(f'{self.abbrev}LIL', current.season)
|
||||
all_drops = Transaction.select_season(Current.latest().season).where(
|
||||
(Transaction.oldteam == lil_team) & (Transaction.week == current.week + 1) & (Transaction.cancelled == 0)
|
||||
(Transaction.oldteam == lil_team) & (Transaction.week == current.week + 1) & (Transaction.cancelled == False)
|
||||
)
|
||||
all_adds = Transaction.select_season(Current.latest().season).where(
|
||||
(Transaction.newteam == lil_team) & (Transaction.week == current.week + 1) & (Transaction.cancelled == 0)
|
||||
(Transaction.newteam == lil_team) & (Transaction.week == current.week + 1) & (Transaction.cancelled == False)
|
||||
)
|
||||
|
||||
for move in all_drops:
|
||||
|
||||
@ -75,14 +75,14 @@ async def get_transactions(
|
||||
transactions = transactions.where(Transaction.player << these_players)
|
||||
|
||||
if cancelled:
|
||||
transactions = transactions.where(Transaction.cancelled == 1)
|
||||
transactions = transactions.where(Transaction.cancelled == True)
|
||||
else:
|
||||
transactions = transactions.where(Transaction.cancelled == 0)
|
||||
transactions = transactions.where(Transaction.cancelled == False)
|
||||
|
||||
if frozen:
|
||||
transactions = transactions.where(Transaction.frozen == 1)
|
||||
transactions = transactions.where(Transaction.frozen == True)
|
||||
else:
|
||||
transactions = transactions.where(Transaction.frozen == 0)
|
||||
transactions = transactions.where(Transaction.frozen == False)
|
||||
|
||||
if is_trade is not None:
|
||||
raise HTTPException(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user