get_unit() does not work as expected
get_unit
does not return the unit when used like this
prop = CaosDB.Entity.get_property(some result from a transaction, 1)
get_unit(prop) # no return with unit set
or
prop = CaosDB.Entity.create_property_entity(
name = "TestProperty",
datatype = "TEXT",
unit = "cm",
is_reference = false,
is_list = false,
)
insert_prop_transaction = create_transaction()
add_insert_entity(insert_prop_transaction, prop)
execute(insert_prop_transaction)
results = get_results(insert_prop_transaction)
retrieve_prop_transaction = create_transaction()
add_retrieve_by_id(retrieve_prop_transaction, get_id(results[1]))
execute(retrieve_prop_transaction)
results = get_results(retrieve_prop_transaction)
get_unit(results[1]) # no return with unit set