mirror of
https://github.com/Cockatrice/Magic-Spoiler.git
synced 2026-04-14 00:58:39 -05:00
Error on type not in valid type list (#108)
This commit is contained in:
parent
4d62dcf946
commit
846a41d2e2
|
|
@ -219,6 +219,11 @@ def error_check(mtgjson, card_corrections={}):
|
|||
errors.append({"name": card['name'], "key": "number", "value": ""})
|
||||
if not 'types' in card:
|
||||
errors.append({"name": card['name'], "key": "types", "value": ""})
|
||||
else:
|
||||
for type in card['types']:
|
||||
if type not in ['Creature', 'Artifact', 'Conspiracy', 'Enchantment', 'Instant', 'Land', 'Phenomenon', 'Plane', 'Planeswalker', 'Scheme',
|
||||
'Sorcery', 'Tribal', 'Vanguard']:
|
||||
errors.append({"name": card['name'], "key": "types", "value":card['types']})
|
||||
|
||||
# we're going to loop through again and make sure split cards get paired
|
||||
for card in mtgjson['cards']:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user