Alejandro Cremades commited on
Commit
0ff4e79
1 Parent(s): 2844b79

Update Card Search to work with new `get_legal_cardnames` behaviour

Browse files
Files changed (1) hide show
  1. Middle_School_Card_Search.py +5 -5
Middle_School_Card_Search.py CHANGED
@@ -33,12 +33,12 @@ results_ja_df = mslist_df[
33
  ]
34
  results_df = results_en_df.merge(results_ja_df, how="outer")
35
  if name_input:
36
- if exact_match is not None:
37
- cardname = exact_match[0]
38
- if exact_match[1] is not None:
39
- cardname = f"{cardname} / {exact_match[1]}"
40
  st.write(
41
- f"✅ [{cardname}]({lib.compose_scryfall_url(exact_match[0])}) is an exact match"
42
  )
43
  st.write(results_df.shape[0], f'cards found by "{name_input}"')
44
  if results_df.shape[0] > number_shown_results:
 
33
  ]
34
  results_df = results_en_df.merge(results_ja_df, how="outer")
35
  if name_input:
36
+ if exact_match[0]:
37
+ cardname = exact_match[1]
38
+ if exact_match[2] is not None:
39
+ cardname = f"{cardname} / {exact_match[2]}"
40
  st.write(
41
+ f"✅ [{cardname}]({lib.compose_scryfall_url(exact_match[1])}) is an exact match"
42
  )
43
  st.write(results_df.shape[0], f'cards found by "{name_input}"')
44
  if results_df.shape[0] > number_shown_results: