This commit is contained in:
Ross
2021-11-30 18:07:43 +00:00
parent c8cf57ac9e
commit d707e9d3d9
2 changed files with 22 additions and 17 deletions
+15 -15
View File
@@ -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;
}
}
+7 -2
View File
@@ -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