Skip to content

Commit

Permalink
Fix finding banned without a join
Browse files Browse the repository at this point in the history
  • Loading branch information
hyanwong committed Apr 16, 2024
1 parent 462da47 commit 40a185f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions controllers/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,13 +855,14 @@ def SET_PRICES():
}
prev = band
if prev is not None:
assert bands[prev].price is None # Check the last has no price set
queries[prev] = db(db.banned.ott) # And set that to the banned list
assert bands[prev].price is None # Check the last has no price set (and ban)
banned = db()._select(db.banned.ott)
queries[prev] = db(db.ordered_leaves.ott.belongs(banned))

#save the results
db.prices.truncate()
for band in sorted(bands):
num=queries[band].count()
num = queries[band].count()
db.prices.insert(
quantile=(float(cutoffs[band][0]) if band in cutoffs else None),
n_leaves=num,
Expand Down

0 comments on commit 40a185f

Please sign in to comment.