lexicon icon indicating copy to clipboard operation
lexicon copied to clipboard

Record type filter is required by Client config validator, but when listing, providers can take None.

Open dsully opened this issue 5 years ago • 0 comments
trafficstars

I'm trying to list records with the Gandi provider - and it can take None as a rtype:

if rtype is not None:
                    query_results = [self._get("/domains/{0}/records/{1}/{2}".format(self.domain_id, self._relative_name(name), rtype))]
                else:
                    query_results = self._get("/domains/{0}/records/{1}".format(self.domain_id, self._relative_name(name)))

However, Client._validate_config raises an AttributeError if type isn't set:

if not self.config.resolve('lexicon:type'):
            raise AttributeError('type')

dsully avatar Aug 13 '20 22:08 dsully