(self, instance, validated_data)
return instance
Update scan policy settings.
Update scan policy settings.
Update scan policy settings .
def update(self, instance, validated_data):
        """Update scan policy settings."""
        policy_data = validated_data.pop('policy')
        policy_id = instance.policy.id
        ScanPolicy.objects.filter(id=policy_id).update(**policy_data)
        instance = ScanInstance.objects.get(id=instance.id)
        return instance
def update ( self , instance , validated_data ) : policy_data = validated_data . pop ( 'policy' ) policy_id = instance . policy . id ScanPolicy . objects . filter ( id = policy_id ) . update ( * * policy_data ) instance = ScanInstance . objects . get ( id = instance . id ) return instance