Fix outfitting module sanity check.

This commit is contained in:
Jonathan Harris committed 2015-09-22 14:55:03 +01:00
1 parent f60df9af07
commit 870fedecd3
1 file changed
+3 -1
+3 -1
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