extracts= accepts tuple as well as list

This commit is contained in:
Simon Willison 2019-07-23 18:53:39 +02:00
commit afad1f70d0
2 changed files with 21 additions and 10 deletions

View file

@ -1033,6 +1033,6 @@ def _hash(record):
def resolve_extracts(extracts):
if extracts is None:
extracts = {}
if isinstance(extracts, list):
if isinstance(extracts, (list, tuple)):
extracts = {item: item for item in extracts}
return extracts