mirror of
https://github.com/ansible/awx.git
synced 2026-03-26 21:35:01 -02:30
Fix AC-1004, Instead of using serializers.Field() which will force a repr() of the object... use serializers.PrimaryKeyField() which will use the expected field type for the response
This commit is contained in:
@@ -443,8 +443,8 @@ class InventorySerializer(BaseSerializerWithVariables):
|
|||||||
class HostSerializer(BaseSerializerWithVariables):
|
class HostSerializer(BaseSerializerWithVariables):
|
||||||
|
|
||||||
# Allow the serializer to treat these fields as read-only
|
# Allow the serializer to treat these fields as read-only
|
||||||
last_job = serializers.Field()
|
last_job = serializers.PrimaryKeyRelatedField(read_only=True)
|
||||||
last_job_host_summary = serializers.Field()
|
last_job_host_summary = serializers.PrimaryKeyRelatedField(read_only=True)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Host
|
model = Host
|
||||||
|
|||||||
Reference in New Issue
Block a user