Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepend Content model hierarchy with _ #215

Merged
merged 1 commit into from
Jan 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion pulp_python/app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
4 changes: 2 additions & 2 deletions pulp_python/app/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion pulp_python/app/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
2 changes: 1 addition & 1 deletion pulp_python/tests/functional/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
)


PYTHON_CONTENT_NAME = 'python'
PYTHON_CONTENT_NAME = 'pulp_python.python'

PYTHON_CONTENT_PATH = urljoin(CONTENT_PATH, 'python/packages/')

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from setuptools import setup, find_packages

requirements = [
'pulpcore-plugin==0.1.0b14',
'pulpcore-plugin==0.1.0b16',
'pkginfo',
'packaging',
]
Expand Down