diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-02-18 12:31:41 +0100 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-04-24 19:38:56 +0200 | 
| commit | a6b1ad5c73d2a51ab2bf6ba1a3451d7298993722 (patch) | |
| tree | 19008016dab5bed93517d99051f09a611b79f5a6 /archaeological_operations/models.py | |
| parent | b7e99763849ae899ad62ded69d3276f5f77e75d7 (diff) | |
| download | Ishtar-a6b1ad5c73d2a51ab2bf6ba1a3451d7298993722.tar.bz2 Ishtar-a6b1ad5c73d2a51ab2bf6ba1a3451d7298993722.zip  | |
Sheet site: add associated document list
Diffstat (limited to 'archaeological_operations/models.py')
| -rw-r--r-- | archaeological_operations/models.py | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 2335155ed..b76e4841e 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -326,6 +326,12 @@ class ArchaeologicalSite(BaseHistorizedItem, OwnPerms, ValueGetter,      def short_class_name(self):          return _(u"SITE") +    @property +    def finds(self): +        from archaeological_finds.models import Find +        return Find.objects.filter( +            base_finds__context_record__archaeological_site__pk=self.pk) +      @classmethod      def get_query_owns(cls, ishtaruser):          from archaeological_warehouse.models import Warehouse  | 
