diff --git a/knackpy/record.py b/knackpy/record.py index 6cf4fe6..d040a7e 100644 --- a/knackpy/record.py +++ b/knackpy/record.py @@ -166,16 +166,16 @@ def format(self, keys: Union[list, bool] = True, values: Union[list, bool] = Tru """ record = {} - for key, field in self.fields.items(): + for field_key, field in self.fields.items(): try: # try to see if key is contained by list keys - key = field.name if key in keys else key + key = field.name if field_key in keys else field_key except TypeError: # assume keys is a bool - key = field.name if keys else key + key = field.name if keys else field_key try: # try to see if value is contained by list values - value = field.formatted if key in values else field.raw + value = field.formatted if field_key in values else field.raw except TypeError: # assume values is a bool value = field.formatted if values else field.raw diff --git a/setup.py b/setup.py index a2aab85..dd97d9b 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ def build_config(env, readme="README.md"): "packages": ["knackpy"], "tests_require": ["pytest", "coverage"], "url": "http://github.com/cityofaustin/knackpy", - "version": "1.0.20", + "version": "1.0.21", }