diff --git a/.travis/script.sh b/.travis/script.sh index 86c07b91..04f0f689 100644 --- a/.travis/script.sh +++ b/.travis/script.sh @@ -8,8 +8,6 @@ flake8 --config flake8.cfg || exit 1 # Run migrations. export DJANGO_SETTINGS_MODULE=pulpcore.app.settings export PULP_CONTENT_HOST=localhost:8080 -pulp-manager migrate auth --noinput -pulp-manager makemigrations pulp_app --noinput pulp-manager makemigrations pulp_python pulp-manager migrate --noinput diff --git a/pulp_python/app/models.py b/pulp_python/app/models.py index 86bfe7d7..56b55713 100644 --- a/pulp_python/app/models.py +++ b/pulp_python/app/models.py @@ -140,7 +140,7 @@ def artifact(self): """ Return the artifact id (there is only one for this content type). """ - return self.artifacts.get().pk + return self._artifacts.get().pk def __str__(self): """ diff --git a/pulp_python/app/serializers.py b/pulp_python/app/serializers.py index 3f31a585..c706a996 100644 --- a/pulp_python/app/serializers.py +++ b/pulp_python/app/serializers.py @@ -223,7 +223,7 @@ def create(self, validated_data): return PythonPackageContent class Meta: - fields = tuple(set(core_serializers.ContentSerializer.Meta.fields) - {'artifacts'}) + ( + fields = tuple(set(core_serializers.ContentSerializer.Meta.fields) - {'_artifacts'}) + ( 'filename', 'packagetype', 'name', 'version', 'metadata_version', 'summary', 'description', 'keywords', 'home_page', 'download_url', 'author', 'author_email', 'maintainer', 'maintainer_email', 'license', 'requires_python', 'project_url', @@ -239,7 +239,7 @@ class MinimalPythonPackageContentSerializer(PythonPackageContentSerializer): """ class Meta: - fields = tuple(set(core_serializers.ContentSerializer.Meta.fields) - {'artifacts'}) + ( + fields = tuple(set(core_serializers.ContentSerializer.Meta.fields) - {'_artifacts'}) + ( 'filename', 'packagetype', 'name', 'version', 'artifact' ) model = python_models.PythonPackageContent diff --git a/pulp_python/app/viewsets.py b/pulp_python/app/viewsets.py index 24d14f59..2e9bfb1f 100644 --- a/pulp_python/app/viewsets.py +++ b/pulp_python/app/viewsets.py @@ -48,7 +48,6 @@ class PythonPackageContentFilter(platform.ContentFilter): class Meta: model = python_models.PythonPackageContent fields = { - 'type': ['exact', 'in'], 'name': ['exact', 'in'], 'author': ['exact', 'in'], 'packagetype': ['exact', 'in'], diff --git a/pulp_python/tests/functional/constants.py b/pulp_python/tests/functional/constants.py index 32e39781..88b1c860 100644 --- a/pulp_python/tests/functional/constants.py +++ b/pulp_python/tests/functional/constants.py @@ -8,7 +8,7 @@ ) -PYTHON_CONTENT_NAME = 'python' +PYTHON_CONTENT_NAME = 'pulp_python.python' PYTHON_CONTENT_PATH = urljoin(CONTENT_PATH, 'python/packages/') diff --git a/setup.py b/setup.py index 3012e902..616d663d 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages requirements = [ - 'pulpcore-plugin==0.1.0b14', + 'pulpcore-plugin==0.1.0b16', 'pkginfo', 'packaging', ]