Skip to content

Commit a192943

Browse files
committed
fix error
1 parent dd6f0d8 commit a192943

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

backend/geonature/core/gn_meta/models.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -552,16 +552,16 @@ def filter_by_scope(self, scope, user=None):
552552
ors = [
553553
TAcquisitionFramework.id_digitizer == user.id_role,
554554
TAcquisitionFramework.cor_af_actor.any(id_role=user.id_role),
555-
TAcquisitionFramework.t_datasets.any(id_digitizer=user.id_role),
556-
TAcquisitionFramework.t_datasets.any(
555+
TAcquisitionFramework.datasets.any(id_digitizer=user.id_role),
556+
TAcquisitionFramework.datasets.any(
557557
TDatasets.cor_dataset_actor.any(id_role=user.id_role)
558558
), # TODO test coverage
559559
]
560560
# if organism is None => do not filter on id_organism even if level = 2
561561
if scope == 2 and user.id_organisme is not None:
562562
ors += [
563563
TAcquisitionFramework.cor_af_actor.any(id_organism=user.id_organisme),
564-
TAcquisitionFramework.t_datasets.any(
564+
TAcquisitionFramework.datasets.any(
565565
TDatasets.cor_dataset_actor.any(id_organism=user.id_organisme)
566566
), # TODO test coverage
567567
]
@@ -579,7 +579,7 @@ def filter_by_areas(self, areas):
579579
Filter meta by areas
580580
"""
581581
return self.where(
582-
TAcquisitionFramework.t_datasets.any(
582+
TAcquisitionFramework.datasets.any(
583583
TDatasets.select.filter_by_areas(areas).whereclause,
584584
),
585585
)
@@ -793,7 +793,7 @@ def has_instance_permission(self, scope, _through_ds=True):
793793
return _through_ds and any(
794794
map(
795795
lambda ds: ds.has_instance_permission(scope, _through_af=False),
796-
self.t_datasets,
796+
self.datasets,
797797
)
798798
)
799799
elif scope == 3:

backend/geonature/core/gn_meta/routes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ def get_export_pdf_acquisition_frameworks(id_acquisition_framework):
636636
# Recuperation des données
637637
af = DB.session.get(TAcquisitionFramework, id_acquisition_framework)
638638
acquisition_framework = af.as_dict(True, depth=2)
639-
dataset_ids = [d.id_dataset for d in af.t_datasets]
639+
dataset_ids = [d.id_dataset for d in af.datasets]
640640
nb_data = len(dataset_ids)
641641

642642
query = (

0 commit comments

Comments
 (0)