Skip to content
Snippets Groups Projects

Return original expression for non-matching regex in find_field_with_sort_order

Merged oury.balde requested to merge topic/16.0/oury into branch/16.0
3 files
+ 7
2
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 1
1
@@ -29,7 +29,7 @@
Returns field name and value if found, else `(None, None)`.
"""
match = re.match(r'(\w+)\.sorted\("([^"]+)"\)', expression)
return match.groups() if match else (None, None)
return match.groups() if match else (expression, None)
def parse_fields_with_sort_directions(input_string):
Loading