Skip to content
Snippets Groups Projects
Commit 397f5c10 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

MAINT: case insensitive special props

parent db761bcb
No related branches found
No related tags found
2 merge requests!53Release 0.1,!50Case insensitive Special Properties
Pipeline #29105 passed with warnings
...@@ -218,15 +218,15 @@ def create_records(values: GeneralStore, ...@@ -218,15 +218,15 @@ def create_records(values: GeneralStore,
keys_modified.append((name, key)) keys_modified.append((name, key))
propvalue, collection_mode = handle_value(value, values) propvalue, collection_mode = handle_value(value, values)
if key in SPECIAL_PROPERTIES: if key.lower() in SPECIAL_PROPERTIES:
# e.g. description, name, etc. # e.g. description, name, etc.
# list mode does not work for them # list mode does not work for them
if key == "path" and not propvalue.startswith(os.path.sep): if key.lower() == "path" and not propvalue.startswith(os.path.sep):
propvalue = os.path.sep + propvalue propvalue = os.path.sep + propvalue
# Convert relative to absolute paths: # Convert relative to absolute paths:
propvalue = os.path.normpath(propvalue) propvalue = os.path.normpath(propvalue)
setattr(c_record, key, propvalue) setattr(c_record, key.lower(), propvalue)
else: else:
if c_record.get_property(key) is None: if c_record.get_property(key) is None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment