parameters: (self, instance, validated_data)
return_statement: return instance
docstring: Update scan policy settings.
docstring_summary: Update scan policy settings.
docstring_tokens: Update scan policy settings .
function: 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
function_tokens: 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