88from pulpcore .plugin .util import get_domain
99
1010from pulp_python .app import models as python_models
11+ from pulp_python .app import fields
1112from pulp_python .app .utils import get_project_metadata_from_artifact , parse_project_metadata
1213
1314
@@ -157,7 +158,7 @@ class PythonPackageContentSerializer(core_serializers.SingleArtifactContentUploa
157158 required = False , allow_blank = True ,
158159 help_text = _ ('A browsable URL for the project and a label for it, separated by a comma.' )
159160 )
160- project_urls = serializers . JSONField (
161+ project_urls = fields . JSONObjectField (
161162 required = False , default = dict ,
162163 help_text = _ ('A dictionary of labels and URLs for the project.' )
163164 )
@@ -170,28 +171,28 @@ class PythonPackageContentSerializer(core_serializers.SingleArtifactContentUploa
170171 required = False , allow_blank = True ,
171172 help_text = _ ('Field to specify the OS and CPU for which the binary package was compiled. ' )
172173 )
173- requires_dist = serializers . JSONField (
174+ requires_dist = fields . JSONObjectField (
174175 required = False , default = list ,
175176 help_text = _ ('A JSON list containing names of some other distutils project '
176177 'required by this distribution.' )
177178 )
178- provides_dist = serializers . JSONField (
179+ provides_dist = fields . JSONObjectField (
179180 required = False , default = list ,
180181 help_text = _ ('A JSON list containing names of a Distutils project which is contained'
181182 ' within this distribution.' )
182183 )
183- obsoletes_dist = serializers . JSONField (
184+ obsoletes_dist = fields . JSONObjectField (
184185 required = False , default = list ,
185186 help_text = _ ('A JSON list containing names of a distutils project\' s distribution which '
186187 'this distribution renders obsolete, meaning that the two projects should not '
187188 'be installed at the same time.' )
188189 )
189- requires_external = serializers . JSONField (
190+ requires_external = fields . JSONObjectField (
190191 required = False , default = list ,
191192 help_text = _ ('A JSON list containing some dependency in the system that the distribution '
192193 'is to be used.' )
193194 )
194- classifiers = serializers . JSONField (
195+ classifiers = fields . JSONObjectField (
195196 required = False , default = list ,
196197 help_text = _ ('A JSON list containing classification values for a Python package.' )
197198 )
0 commit comments