SciCatProject/backend-v3

'u' of Object type should not be treated as a unit

Opened this issue · 0 comments

Summary

Currently "u" in ingested RawDataset json is treated as a unit, even if it is a dictionary i.e. a JS object.
Our users often use u to denote the chi angle position. It would be good to check if "u" is a dictionary or a string and treat it as a unit only if it is a string.

Steps to Reproduce

ingest scientificMetadata containing

{
  "u":
    {
        "value": 12.323,
        "unit": "deg"
    }
}

Current Behaviour

All 'u' are treated as units and unitSI is added with a weird content e.g.

u_object_scicat

Expected Behaviour

It would be good to check if "u" is a dictionary or a string and treat it as a unit only if it is a string.