diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index db7df2b..2e1512c 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -34,10 +34,8 @@ services: - 5432:5432 volumes: - mabras_dbdata:/var/lib/postgresql/data - environment: - - POSTGRES_PASSWORD - - POSTGRES_USER - - POSTGRES_DB + env_file: + - .env healthcheck: test: pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB} interval: 10s diff --git a/eveal/main.py b/eveal/main.py index 002b708..ff25df3 100644 --- a/eveal/main.py +++ b/eveal/main.py @@ -30,14 +30,14 @@ async def reprocess(ep_items: Evepraisal, ep_mat: Evepraisal, efficiency: float item = db.get(models_sde.SDEType, rawitem.typeID) buy_reprocess = sell_reprocess = 0.0 for mat in item.materials.all(): - buy_reprocess += matprices[mat.type.id]['buy'] * mat.quantity * efficiency - sell_reprocess += matprices[mat.type.id]['sell'] * mat.quantity * efficiency - item_reprocess.append(PriceReprocess(typeID=item.typeID, - buy=item.prices.buy.max, - sell=item.prices.sell.min, + buy_reprocess += matprices[mat.material_type_id]['buy'] * mat.quantity * efficiency + sell_reprocess += matprices[mat.material_type_id]['sell'] * mat.quantity * efficiency + item_reprocess.append(PriceReprocess(typeID=rawitem.typeID, + buy=rawitem.prices.buy.max, + sell=rawitem.prices.sell.min, buy_reprocess=buy_reprocess, sell_reprocess=sell_reprocess, - name=item.name + name=rawitem.name )) return item_reprocess