From 9423a61283e91b72379a4c39cdaf79a1d7e4b35d Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Thu, 11 Feb 2016 16:20:58 +0100 Subject: [PATCH] Fix CSS color and unknown policy wrongly reported as being forbidden --- main.py | 4 +--- views/template.tpl | 8 +++++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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.