pledge4future/WePledge

Heating emission entry fails with backend error

Closed this issue · 1 comments

When trying to add a heating emission entry with a valid energy source and unit combination (see #233 ), the backend still fails to handle the request.

Request:

{
    "timestamp": "2021-04-01",
    "consumption": 5000,
    "fuelType": "Oil",
    "building": "205",
    "groupShare": 5,
    "unit": "l"
}

Error Message:

{
    "message": "'NoneType' object has no attribute 'n_employees'",
    "locations": [
        {
            "line": 2,
            "column": 3
        }
    ],
    "path": [
        "createHeating"
    ]
}

I was able to identify this as a result of #213.