Skip to content

Commit 79240fc

Browse files
committed
🐛 Fix numerical sorting
1 parent 2e5e941 commit 79240fc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

openaleph_search/index/mapping.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,11 +364,12 @@ def get_index_field_type(type_, to_numeric: bool | None = False) -> str:
364364
return FieldType.KEYWORD["type"]
365365

366366

367-
def get_field_type(field) -> str:
367+
def get_field_type(field):
368+
"""Return the FtM registry type object for a given field path."""
368369
field = field.split(".")[-1]
369370
if field in registry.groups:
370-
return str(registry.groups[field])
371+
return registry.groups[field]
371372
for prop in model.properties:
372373
if prop.name == field:
373-
return str(prop.type)
374-
return str(registry.string)
374+
return prop.type
375+
return registry.string

0 commit comments

Comments
 (0)