@@ -552,16 +552,16 @@ def filter_by_scope(self, scope, user=None):
552
552
ors = [
553
553
TAcquisitionFramework .id_digitizer == user .id_role ,
554
554
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 (
557
557
TDatasets .cor_dataset_actor .any (id_role = user .id_role )
558
558
), # TODO test coverage
559
559
]
560
560
# if organism is None => do not filter on id_organism even if level = 2
561
561
if scope == 2 and user .id_organisme is not None :
562
562
ors += [
563
563
TAcquisitionFramework .cor_af_actor .any (id_organism = user .id_organisme ),
564
- TAcquisitionFramework .t_datasets .any (
564
+ TAcquisitionFramework .datasets .any (
565
565
TDatasets .cor_dataset_actor .any (id_organism = user .id_organisme )
566
566
), # TODO test coverage
567
567
]
@@ -579,7 +579,7 @@ def filter_by_areas(self, areas):
579
579
Filter meta by areas
580
580
"""
581
581
return self .where (
582
- TAcquisitionFramework .t_datasets .any (
582
+ TAcquisitionFramework .datasets .any (
583
583
TDatasets .select .filter_by_areas (areas ).whereclause ,
584
584
),
585
585
)
@@ -793,7 +793,7 @@ def has_instance_permission(self, scope, _through_ds=True):
793
793
return _through_ds and any (
794
794
map (
795
795
lambda ds : ds .has_instance_permission (scope , _through_af = False ),
796
- self .t_datasets ,
796
+ self .datasets ,
797
797
)
798
798
)
799
799
elif scope == 3 :
0 commit comments