mirror of
https://github.com/ansible/awx.git
synced 2026-02-22 05:30:18 -03: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):
|
||||
|
||||
# Allow the serializer to treat these fields as read-only
|
||||
last_job = serializers.Field()
|
||||
last_job_host_summary = serializers.Field()
|
||||
last_job = serializers.PrimaryKeyRelatedField(read_only=True)
|
||||
last_job_host_summary = serializers.PrimaryKeyRelatedField(read_only=True)
|
||||
|
||||
class Meta:
|
||||
model = Host
|
||||
|
||||
Reference in New Issue
Block a user