Skip to content
Snippets Groups Projects
Commit 4e423a9e authored by Erwan Rouchet's avatar Erwan Rouchet Committed by Bastien Abadie
Browse files

Fix slash stripping in Image data migration

parent fd9ec32b
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ def deduplicate_and_strip(apps, schema_editor):
ImageServer.objects.annotate(
# PostgreSQL supports trimming things that are not just spaces,
# But django.db.models.functions.Trim doesn't.
trimmed_url=RawSQL("trim(trailing '/' from url)", ())
trimmed_url=RawSQL("trim(leading '/' from url)", ())
).order_by('trimmed_url'),
key=lambda s: s.trimmed_url,
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment