Boavizta / boaviztapi

🛠 Giving access to BOAVIZTA reference data and methodologies trough a RESTful API
GNU Affero General Public License v3.0
73 stars 23 forks source link

Server router doesn't take the input values of a SSD #128

Closed da-ekchajzer closed 1 year ago

da-ekchajzer commented 1 year ago

Bug description

On /server router, a well-defined SSD :

 {
        "units": 2,
        "type": "SSD",
        "capacity": 500,
        "manufacturer": "Samsung"
}

Is transformed by the API by a default one :

 "SSD-1": {
      "units": 2,
      "manufacture_impacts": {
        "gwp": {
          "value": 52,
          "unit": "kgCO2eq"
        },
        "pe": {
          "value": 640,
          "unit": "MJ"
        },
        "adp": {
          "value": 0.0019,
          "unit": "kgSbeq"
        }
      },
      "capacity": {
        "value": 1000,
        "unit": "GB",
        "status": "DEFAULT",
        "source": null
      },
      "density": {
        "value": 48.5,
        "unit": "GB/cm2",
        "status": "DEFAULT",
        "source": null
    }
},
da-ekchajzer commented 1 year ago

This bug is caused by the fact that type is case-sensitive. We need to make sure that the type is changed to lower case