diff --git a/anatomy/static/css/anatomy.css b/anatomy/static/css/anatomy.css index 2653b7ca..2bb73016 100644 --- a/anatomy/static/css/anatomy.css +++ b/anatomy/static/css/anatomy.css @@ -774,29 +774,29 @@ input { border-color: #05668d; } -.select2-selection { +.select2-selection, +.select2-selection--single { background-color: #05668d; - color: white; - /* border: 1px solid #aaa; */ - border-radius: 0px; + color: white; + /* border: 1px solid #aaa; */ + border-radius: 0px; } .select2-search__field { background-color: #05668d; - color: darkblue; - border: 1px solid black; + color: darkblue; + border: 1px solid black; - } +} - .temp-thumb-large { - width: 1000px; - height: 1000px; - max-width: 1000px; - } +.temp-thumb-large { + width: 1000px; + height: 1000px; + max-width: 1000px; +} - .image-duplicate { +.image-duplicate { border: 2px solid orange; - } - +} \ No newline at end of file diff --git a/atlas/views.py b/atlas/views.py index dd33fcfe..864fa6b3 100755 --- a/atlas/views.py +++ b/atlas/views.py @@ -574,8 +574,13 @@ class ConditionAutocomplete(autocomplete.Select2QuerySetView): if self.q: # This raises a fielderror which breaks creating a new item if not caught try: - qs = qs.filter(name__icontains=self.q) + primary = qs.filter(name__icontains=self.q) + + #synonyms = qs.filter(name__icontains=self.q, primary_name=False) + #for s in synonyms: + # primary.extend(s.synonym.filter(primary_name=True)) + except FieldError: return Condition.objects.none() - return qs + return primary