Skip to content

Commit

Permalink
Merge pull request #590 from jbernal0019/master
Browse files Browse the repository at this point in the history
Add pipeline_id and pipeline_name filters to pipeline source files searches
  • Loading branch information
jbernal0019 authored Oct 25, 2024
2 parents 9e908c9 + 357f5a9 commit 5e031a4
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 5e031a4

Please sign in to comment.