electricitymaps / bloom-contrib

Making carbon footprint data available to everyone.

Home Page:https://www.bloomclimate.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Purchase model is not checking for identifier

madsnedergaard opened this issue · comments

Description

The purchase canModelRun() implementation is not checking for identifier and therefore calculations fail a lot of times were it shouldn't have been running.

To reproduce

Steps to reproduce:

  1. Check logs here: https://console.cloud.google.com/run/detail/europe-west1/lh-footprint-updater/logs?project=tmrowapp

Expected behaviour

canModelRun should return false if a purchase activity any identifier is null.

Pseudo code fix:

lineItems.every(item => item.identifier !== null)

Anything that needs to be done here, except for merging? :)

CI is failing due to issue with dates in energinet test.. Will look into it now

Open until contrib is bumped!

Aaand done!