1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-16 09:10:35 +03:00

Fixed nonplural var containing plural names

This commit is contained in:
A_D 2021-06-02 13:15:57 +02:00
parent 6a02b6efc7
commit 86de3769d2
No known key found for this signature in database
GPG Key ID: 4BE9EB7DF45076C4

View File

@ -1085,11 +1085,11 @@ def journal_entry( # noqa: C901, CCR001
new_add_event('addCommanderTravelLand', entry['timestamp'], to_send_data)
elif event_name == 'ShipLockerMaterials':
odyssey_nonplural_microresource_types = ('Items', 'Components', 'Data', 'Consumables')
odyssey_plural_microresource_types = ('Items', 'Components', 'Data', 'Consumables')
# we're getting new data here. so reset it on inara's side just to be sure that we set everything right
reset_data = [{'itemType': t} for t in odyssey_nonplural_microresource_types]
reset_data = [{'itemType': t} for t in odyssey_plural_microresource_types]
set_data = []
for typ in odyssey_nonplural_microresource_types:
for typ in odyssey_plural_microresource_types:
set_data.extend([
{'itemName': thing['Name'], 'itemCount': thing['Count'], 'itemType': typ} for thing in entry[typ]
])