summaryrefslogtreecommitdiff
path: root/archaeological_finds
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_finds')
-rw-r--r--archaeological_finds/models_finds.py3
-rw-r--r--archaeological_finds/tests.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index c83e78eaa..3adaf90dd 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -2220,7 +2220,8 @@ class Find(BulkUpdatedItem, ValueGetter, DocumentItem, BaseHistorizedItem,
container = self.container
if not container:
return ""
- locas = container.get_localisations()
+ ## first localisation is the warehouse
+ locas = list(container.get_localisations())[1:]
if len(locas) < (place + 1):
return ""
return locas[place]
diff --git a/archaeological_finds/tests.py b/archaeological_finds/tests.py
index 80202f442..9387840a0 100644
--- a/archaeological_finds/tests.py
+++ b/archaeological_finds/tests.py
@@ -1930,7 +1930,7 @@ class TreatmentTest(FindInit, TestCase):
self.create_finds(data_base={"label": u"Find 1"}, force=True)
self.create_finds(data_base={"label": u"Find 2"}, force=True)
image = Document.objects.create(title="Image!")
- image.image.save('ishtar-bg.jpg', File(open(img)))
+ image.image.save('ishtar-bg.jpg', File(open(img, "rb")))
self.finds[0].documents.add(image)
self.finds[0].save()