Skip to content
Snippets Groups Projects
Commit 1a062245 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Remove unused method

parent 4a54b697
No related branches found
No related tags found
No related merge requests found
...@@ -174,25 +174,6 @@ class RoundsTable(tables.Table): ...@@ -174,25 +174,6 @@ class RoundsTable(tables.Table):
def _field_order(self, field, desc): def _field_order(self, field, desc):
return getattr(F(f'{field}'), 'desc' if desc else 'asc')(nulls_last=True) return getattr(F(f'{field}'), 'desc' if desc else 'asc')(nulls_last=True)
def _order(self, qs, desc, field, round=True, lab=True):
annotated_name = field.split('__')[0]
fields = [
f_field
for f_field, show in [(F(f'roundbase__{field}'), round), (F(f'labbase__{field}'), lab)]
if show
]
if lab and round:
lookup = Coalesce(*fields)
else:
lookup = fields[0]
qs = qs.annotate(
**{annotated_name: lookup}
)
qs = qs.order_by(self._field_order(annotated_name, desc))
return qs, True
def order_start_date(self, qs, desc): def order_start_date(self, qs, desc):
return qs.order_by(self._field_order('start_date', desc)), True return qs.order_by(self._field_order('start_date', desc)), True
......
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