summaryrefslogtreecommitdiff
path: root/archaeological_finds/models_finds.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-02-29 11:11:28 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2024-04-16 16:43:02 +0200
commit87786477efc215563c59326fd25800675b2d4678 (patch)
tree3fcd77c50baf61797d1f3b829052b7e4cc48a5d5 /archaeological_finds/models_finds.py
parentf336ff2ec67dffab78d876a0218293aaf85b098d (diff)
downloadIshtar-87786477efc215563c59326fd25800675b2d4678.tar.bz2
Ishtar-87786477efc215563c59326fd25800675b2d4678.zip
🗃️ Find - Museum: museum_assigned_institution, db, forms, sheet
Diffstat (limited to 'archaeological_finds/models_finds.py')
-rw-r--r--archaeological_finds/models_finds.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index 90722b36d..8a28cc272 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -1668,6 +1668,10 @@ class Find(
pgettext_lazy("key for text search", "museum-owner-institution"),
"museum_owner_institution__name__iexact"
),
+ "museum_assigned_institution": SearchAltName(
+ pgettext_lazy("key for text search", "museum-assigned-institution"),
+ "museum_assigned_institution__name__iexact"
+ ),
"museum_custodian_institution": SearchAltName(
pgettext_lazy("key for text search", "museum-custodian-institution"),
"museum_custodian_institution__name__iexact"
@@ -1819,6 +1823,7 @@ class Find(
SearchVectorConfig("decoration"),
SearchVectorConfig("manufacturing_place"),
SearchVectorConfig("museum_owner_institution__name", "raw"),
+ SearchVectorConfig("museum_assigned_institution__name", "raw"),
SearchVectorConfig("museum_custodian_institution__name", "raw"),
SearchVectorConfig("museum_depositor_inventory_number", "raw"),
SearchVectorConfig("museum_entry_mode_comment"),
@@ -2145,6 +2150,11 @@ class Find(
related_name="owns",
verbose_name=_("Owner institution"),
)
+ museum_assigned_institution = models.ForeignKey(
+ Organization, blank=True, null=True, on_delete=models.SET_NULL,
+ related_name="assigned",
+ verbose_name=_("Assigned institution"),
+ )
museum_custodian_institution = models.ForeignKey(
Organization, blank=True, null=True, on_delete=models.SET_NULL,
related_name="deposited",