parameters: (self, value)
return_statement: return value
docstring: Ensure that VPN can't be added when
          template `Type` is set to `Generic`.
docstring_summary: Ensure that VPN can't be added when
          template `Type` is set to `Generic`.
docstring_tokens: Ensure that VPN can t be added when template Type is set to Generic .
function: def validate_vpn(self, value):
          """
          Ensure that VPN can't be added when
          template `Type` is set to `Generic`.
          """
          if self.initial_data.get('type') == 'generic' and value is not None:
              raise serializers.ValidationError(
                  _("To select a VPN, set the template type to 'VPN-client'")
              )
          return value
function_tokens: def validate_vpn ( self , value ) : if self . initial_data . get ( 'type' ) == 'generic' and value is not None : raise serializers . ValidationError ( _ ( "To select a VPN, set the template type to 'VPN-client'" ) ) return value