Skip to content

Commit

Permalink
Merge pull request #108 from cityofaustin/dev
Browse files Browse the repository at this point in the history
v1.0.21
  • Loading branch information
johnclary authored Apr 12, 2022
2 parents 3bc2ba6 + 0035913 commit 1663d16
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions knackpy/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}


Expand Down

0 comments on commit 1663d16

Please sign in to comment.