diff options
Diffstat (limited to 'archaeological_warehouse/models.py')
| -rw-r--r-- | archaeological_warehouse/models.py | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index 2851e1df0..96814339c 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -31,7 +31,6 @@ from ishtar_common.utils import cached_label_changed  from ishtar_common.models import GeneralType, get_external_id, \      LightHistorizedItem, OwnPerms, Address, Person, post_save_cache, \      ImageModel, DashboardFormItem -from archaeological_finds.models import Find  class WarehouseType(GeneralType): @@ -87,10 +86,12 @@ class Warehouse(Address, DashboardFormItem, OwnPerms):      @property      def number_of_finds(self): +        from archaeological_finds.models import Find          return Find.objects.filter(container__responsible=self).count()      @property      def number_of_finds_hosted(self): +        from archaeological_finds.models import Find          return Find.objects.filter(container__location=self).count()      @property @@ -161,6 +162,7 @@ class Warehouse(Address, DashboardFormItem, OwnPerms):          return final_res      def _number_of_finds_by_place(self): +        from archaeological_finds.models import Find          return self._number_of_items_by_place(              Find, division_key='container__division') | 
