Skip to content

Commit

Permalink
Fix defaulting of value to blank string when not specified
Browse files Browse the repository at this point in the history
If content is not passed in, the filter still gets run with a blank
string for some reason. Extending Filter instead of CharFilter seems to
fix this.

fixes #3502
https://pulp.plan.io/issues/3502
  • Loading branch information
David Davis authored and daviddavis committed Mar 21, 2018
1 parent f30561a commit 1cb4e19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pulpcore/pulpcore/app/viewsets/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import itertools

from django_filters.rest_framework import filters, filterset
from django_filters import CharFilter
from django_filters import Filter
from rest_framework import decorators, mixins, serializers

from pulpcore.app import tasks
Expand Down Expand Up @@ -119,7 +119,7 @@ class Meta:
]


class RepositoryVersionContentFilter(CharFilter):
class RepositoryVersionContentFilter(Filter):
"""
Filter used to get the repository versions where some given content can be found.
Expand Down

0 comments on commit 1cb4e19

Please sign in to comment.