Skip to content
Snippets Groups Projects
Commit cd206686 authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

fix ordering of the sorting options in compounds list

Former-commit-id: 38b80a9cfdb558330ebf6dd07cab8850184b989c
parent b67e508f
No related branches found
No related tags found
No related merge requests found
import json import json
import math import math
from collections import OrderedDict
from django.db.models import Max, Min, Count from django.db.models import Max, Min, Count
from django.shortcuts import render from django.shortcuts import render
...@@ -201,7 +202,7 @@ def compound_list(request): ...@@ -201,7 +202,7 @@ def compound_list(request):
display = 'v' display = 'v'
context['display']=display context['display']=display
compound_fields = {f.name: f.verbose_name for f in Compound._meta.get_fields() if not(f.is_relation)} compound_fields = {f.name: f.verbose_name for f in Compound._meta.get_fields() if not(f.is_relation)}
sort_by_options = {} sort_by_options = OrderedDict()
for sort_by_option_id in sort_by_option_ids: for sort_by_option_id in sort_by_option_ids:
if sort_by_option_id == 'pubs': if sort_by_option_id == 'pubs':
name = 'Number of publications' name = 'Number of publications'
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment