1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 08:17:13 +03:00

Fix outfitting module sanity check.

This commit is contained in:
Jonathan Harris 2015-08-26 13:41:38 +01:00
parent f60df9af07
commit 870fedecd3

View File

@ -320,7 +320,9 @@ def lookup(module):
# check we've filled out mandatory fields
for thing in ['category', 'name', 'class', 'rating']:
if not new.get('name'): raise AssertionError('%s: failed to set %s' % (module['id'], thing))
if not new.get(thing): raise AssertionError('%s: failed to set %s' % (module['id'], thing))
if new['category'] == 'hardpoint' and not new.get('mount'):
raise AssertionError('%s: failed to set %s' % (module['id'], 'mount'))
return new