discard unknown sets when searching original release
This commit is contained in:
parent
9a56895164
commit
c249c872da
@ -44,9 +44,7 @@ impl From<&Card> for SearchCard {
|
|||||||
original_year: card
|
original_year: card
|
||||||
.card_sets
|
.card_sets
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|s| {
|
.filter_map(|s| SETS_BY_NAME.get(&s.set_name.to_lowercase()).and_then(|s| s.tcg_date))
|
||||||
SETS_BY_NAME.get(&s.set_name.to_lowercase()).unwrap_or_else(|| panic!("Set {} not found", s.set_name)).tcg_date
|
|
||||||
})
|
|
||||||
.map(Date::year)
|
.map(Date::year)
|
||||||
.min(),
|
.min(),
|
||||||
legal_copies: card.banlist_info.map(|bi| bi.ban_tcg).unwrap_or(BanlistStatus::Unlimited) as i32,
|
legal_copies: card.banlist_info.map(|bi| bi.ban_tcg).unwrap_or(BanlistStatus::Unlimited) as i32,
|
||||||
|
Loading…
Reference in New Issue
Block a user