ram-lexsi commited on
Commit
00776fa
·
verified ·
1 Parent(s): cabe736

Status pills: once 3+ reviews are submitted, show a green pill for every judge who submitted

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -341,6 +341,10 @@ def light(v):
341
  def lights(u, j, s, st):
342
  """Slot 1 is the viewer. Slots 2-3: two other judges on this submission, picked at random
343
  (stable per viewer and submission), from its track list plus anyone who has started it. None = empty."""
 
 
 
 
344
  others = {judge_id(x) for x in TRACK_JUDGES.get(s.get("track"), ())} | set(st)
345
  others.discard(j)
346
  import random
 
341
  def lights(u, j, s, st):
342
  """Slot 1 is the viewer. Slots 2-3: two other judges on this submission, picked at random
343
  (stable per viewer and submission), from its track list plus anyone who has started it. None = empty."""
344
+ done_others = sorted(o for o, v in st.items() if o != j and v == "submitted")
345
+ if sum(v == "submitted" for v in st.values()) >= 3:
346
+ # 3+ submitted reviews: one green pill per other judge who submitted, after your own
347
+ return [light(st.get(j))] + ["done"] * len(done_others)
348
  others = {judge_id(x) for x in TRACK_JUDGES.get(s.get("track"), ())} | set(st)
349
  others.discard(j)
350
  import random