diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2020-02-26 12:16:22 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2020-02-26 12:16:22 -0800 |
commit | 21239503ddd71c69ddf651260f2953c93f227dfc (patch) | |
tree | 6d7eeb641444bfaaf8a73c89394c0549ea141509 /python | |
parent | c57a743cb8b774750c99c6f079438666a87f6476 (diff) | |
download | fatcat-21239503ddd71c69ddf651260f2953c93f227dfc.tar.gz fatcat-21239503ddd71c69ddf651260f2953c93f227dfc.zip |
fix fatcat_transform state filters
Diffstat (limited to 'python')
-rwxr-xr-x | python/fatcat_transform.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/python/fatcat_transform.py b/python/fatcat_transform.py index 9ddbaa4d..23a56109 100755 --- a/python/fatcat_transform.py +++ b/python/fatcat_transform.py @@ -30,7 +30,7 @@ def run_elasticsearch_releases(args): if not line: continue entity = entity_from_json(line, ReleaseEntity, api_client=args.api.api_client) - if entity['state'] != 'active': + if entity.state != 'active': continue args.json_output.write( json.dumps(release_to_elasticsearch(entity)) + '\n') @@ -41,7 +41,7 @@ def run_elasticsearch_containers(args): if not line: continue entity = entity_from_json(line, ContainerEntity, api_client=args.api.api_client) - if entity['state'] != 'active': + if entity.state != 'active': continue args.json_output.write( json.dumps(container_to_elasticsearch(entity)) + '\n') @@ -52,7 +52,7 @@ def run_elasticsearch_files(args): if not line: continue entity = entity_from_json(line, FileEntity, api_client=args.api.api_client) - if entity['state'] != 'active': + if entity.state != 'active': continue args.json_output.write( json.dumps(file_to_elasticsearch(entity)) + '\n') @@ -72,7 +72,7 @@ def run_citeproc_releases(args): if not line: continue entity = entity_from_json(line, ReleaseEntity, api_client=args.api.api_client) - if entity['state'] != 'active': + if entity.state != 'active': continue csl_json = release_to_csl(entity) csl_json['id'] = "release:" + (entity.ident or "unknown") |