def compute_filter(cls, **kwargs): f = super().compute_filter(**kwargs) uuid = kwargs.get('uuid') if uuid is not None: try: uuid = UUID(uuid.strip()) except TypeError: pass else: f &= TAcquisitionFramework.unique_acquisition_framework_id == uuid name = kwargs.get('name') if name is not None: f &= TAcquisitionFramework.acquisition_framework_name.ilike(f'%{name}%') return f
def compute_filter(cls, **kwargs): f = super().compute_filter(**kwargs) uuid = kwargs.get('uuid') if uuid is not None: try: uuid = UUID(uuid.strip()) except TypeError: pass else: f &= TDatasets.unique_dataset_id == uuid name = kwargs.get('name') if name is not None: f &= TDatasets.dataset_name.ilike(f'%{name}%') return f