Skip to content

Commit

Permalink
fix: fix sorting tags on MySQL
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenmacdonald committed Oct 20, 2023
1 parent 868f3b8 commit 088cfe8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions openedx_tagging/core/tagging/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ def _get_filtered_tags_deep(
Coalesce(ConcatNull(F("parent__parent__value"), Value("\t")), Value("")),
Coalesce(ConcatNull(F("parent__value"), Value("\t")), Value("")),
F("value"),
Value("\t"), # We also need the '\t' separator character at the end, or MySQL will sort things wrong
output_field=models.CharField(),
))
# Add the parent value
Expand Down

0 comments on commit 088cfe8

Please sign in to comment.