Skip to content

Commit

Permalink
PR Issue 1932 (#1934)
Browse files Browse the repository at this point in the history
* Fix ScaleFile.objects.filter_files ingest time and mime type filters

* fix with a workaround

* fix second attempt
  • Loading branch information
bernardfazziniais authored Dec 30, 2021
1 parent 749956d commit 2db9580
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scale/job/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ def filter_jobs(self, started=None, ended=None, source_started=None, source_ende
jobs = duration.order_by("duration")

# Bernard - i still dont understand Django auto-magic, but this is a workaround for this bug. If job_type passed its a type cast error on sort, thinks it an INT
elif order=='job_type':
jobs = jobs.order_by('job_type__name')
elif order and order[0].endswith("job_type"):
jobs = jobs.order_by(order[0]+'__name')

# Apply other sorting
elif order:
Expand Down

0 comments on commit 2db9580

Please # to comment.