diff --git a/api/tacticalrmm/agents/serializers.py b/api/tacticalrmm/agents/serializers.py index fd0ccee4..4d19b17f 100644 --- a/api/tacticalrmm/agents/serializers.py +++ b/api/tacticalrmm/agents/serializers.py @@ -38,13 +38,15 @@ class AgentSerializer(serializers.ModelSerializer): client = serializers.ReadOnlyField(source="client.name") site_name = serializers.ReadOnlyField(source="site.name") custom_fields = AgentCustomFieldSerializer(many=True, read_only=True) + patches_last_installed = serializers.ReadOnlyField() + last_seen = serializers.ReadOnlyField() def get_all_timezones(self, obj): return pytz.all_timezones class Meta: model = Agent - exclude = ["last_seen", "id", "patches_last_installed"] + exclude = ["id"] class AgentTableSerializer(serializers.ModelSerializer): diff --git a/web/src/components/automation/modals/PolicyAdd.vue b/web/src/components/automation/modals/PolicyAdd.vue index a18b4f28..27b0a777 100644 --- a/web/src/components/automation/modals/PolicyAdd.vue +++ b/web/src/components/automation/modals/PolicyAdd.vue @@ -115,7 +115,6 @@ export default { url = `/clients/${this.object.id}/`; data = { client: { - pk: this.object.id, server_policy: this.selectedServerPolicy, workstation_policy: this.selectedWorkstationPolicy, block_policy_inheritance: this.blockInheritance, @@ -125,7 +124,6 @@ export default { url = `/clients/sites/${this.object.id}/`; data = { site: { - pk: this.object.id, server_policy: this.selectedServerPolicy, workstation_policy: this.selectedWorkstationPolicy, block_policy_inheritance: this.blockInheritance, @@ -186,7 +184,7 @@ export default { if (this.type !== "agent") { this.selectedServerPolicy = this.object.server_policy; this.selectedWorkstationPolicy = this.object.workstation_policy; - this.blockInheritance = this.object.blockInheritance; + this.blockInheritance = this.object.block_policy_inheritance; } else { this.selectedAgentPolicy = this.object.policy; this.blockInheritance = this.object.block_policy_inheritance;