Skip to content

Commit 326e590

Browse files
authored
Merge pull request #172 from cmu-delphi/staging
Staging
2 parents 690c1b4 + 481e869 commit 326e590

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/indicatorsets/views.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
import base64
23
import json
34
import requests
@@ -222,7 +223,12 @@ def get_context_data(self, **kwargs):
222223
default=Value(0),
223224
output_field=IntegerField(),
224225
),
225-
).order_by("-is_ongoing", "-is_dua_required", "name")
226+
beta_last=Case(
227+
When(name__istartswith="beta", then=Value(sys.maxsize)),
228+
default=Value(0),
229+
output_field=IntegerField(),
230+
),
231+
).order_by("beta_last", "-is_ongoing", "-is_dua_required", "name")
226232
context["related_indicators"] = json.dumps(
227233
self.get_related_indicators(
228234
filter.indicators_qs, filter.qs.values_list("id", flat=True)

0 commit comments

Comments
 (0)