diff --git a/main.py b/main.py index 9dcb7a4..bd8a162 100755 --- a/main.py +++ b/main.py @@ -19,9 +19,7 @@ def format_citation(doi_url): canonical_doi = doi.to_canonical(doi_url) sharable = doi.get_oa_policy(canonical_doi) - if sharable is None: - sharable = False - else: + if sharable is not None: sharable = "can" in sharable.values() return { diff --git a/views/template.tpl b/views/template.tpl index 9282b7f..b1785b4 100644 --- a/views/template.tpl +++ b/views/template.tpl @@ -29,11 +29,11 @@ } .red { - text-color: red; + color: red; } .green { - text-color: green; + color: green; } @@ -63,7 +63,9 @@ % else: No OpenAccess version found. - % if v["sharable"]: + % if v["sharable"] is not None: + OpenAccess policy is unknown. + % elif v["sharable"]: It could be shared. % else: It could not be shared.