Skip to content

Commit 7739370

Browse files
committed
Update tasks to return JSON-serializable values
closes #972
1 parent 7b1b409 commit 7739370

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGES/972.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Updated tasks to always return JSON-serializable value.

pulp_python/app/tasks/publish.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from pulpcore.plugin.util import get_domain
1010

1111
from pulp_python.app import models as python_models
12+
from pulp_python.app.serializers import PythonPublicationSerializer
1213
from pulp_python.app.utils import write_simple_index, write_simple_detail
1314

1415

@@ -36,6 +37,7 @@ def publish(repository_version_pk):
3637
write_simple_api(pub)
3738

3839
log.info(_("Publication: {pk} created").format(pk=pub.pk))
40+
pub = PythonPublicationSerializer(instance=pub, context={"request": None}).data
3941
return pub
4042

4143

0 commit comments

Comments
 (0)