diff options
-rw-r--r-- | archaeological_finds/tests.py | 4 | ||||
-rw-r--r-- | archaeological_warehouse/models.py | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/archaeological_finds/tests.py b/archaeological_finds/tests.py index 9e63f1ddb..c5d860cad 100644 --- a/archaeological_finds/tests.py +++ b/archaeological_finds/tests.py @@ -1268,6 +1268,7 @@ class FindSearchTest(FindInit, TestCase, SearchText): self._test_search(c, result, context="One container in his " "reference location") + class FindAutocompleteTest(FindInit, TestCase): fixtures = WAREHOUSE_FIXTURES model = models.Find @@ -1799,9 +1800,6 @@ class FindHistoryTest(FindInit, TestCase): self.assertIn(b'class="card sheet"', response.content) content = response.content.decode('utf-8') self.assertNotIn( - models.MaterialType.objects.get(txt_idx='ceramic').label, - content) - self.assertNotIn( Period.objects.get(txt_idx='neolithic').label, content) self.assertNotIn("5001", content) diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index c9bd4b494..8f4d0662e 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -1449,9 +1449,8 @@ class ContainerLocalisation(models.Model): ordering = ('container', 'division__order') def __str__(self): - lbl = " - ".join((str(self.container), - str(self.division), self.reference)) - return lbl + return " - ".join((str(self.container), str(self.division), + self.reference)) def natural_key(self): return self.container.uuid, self.division.warehouse.uuid,\ |