Skip to content

Commit

Permalink
Add pipeline_id and pipeline_name filters to pipeline source files se…
Browse files Browse the repository at this point in the history
…arches
  • Loading branch information
jbernal0019 committed Oct 25, 2024
1 parent 9e908c9 commit 357f5a9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion chris_backend/pipelines/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,17 @@ class PipelineSourceFileFilter(FilterSet):
fname_exact = django_filters.CharFilter(field_name='fname', lookup_expr='exact')
fname_icontains = django_filters.CharFilter(field_name='fname',
lookup_expr='icontains')
pipeline_id = django_filters.CharFilter(field_name='meta__pipeline_id',
lookup_expr='exact')
pipeline_name = django_filters.CharFilter(field_name='meta__pipeline__name',
lookup_expr='exact')
uploader_username = django_filters.CharFilter(field_name='meta__uploader__username',
lookup_expr='exact')

class Meta:
model = PipelineSourceFile
fields = ['id', 'min_creation_date', 'max_creation_date', 'fname', 'fname_exact',
'fname_icontains', 'uploader_username']
'fname_icontains', 'pipeline_id', 'pipeline_name', 'uploader_username']


class PipelineSourceFileMeta(models.Model):
Expand Down

0 comments on commit 357f5a9

Please sign in to comment.