Fix CSS color and unknown policy wrongly reported as being forbidden
This commit is contained in:
parent
d22f57a610
commit
9423a61283
4
main.py
4
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 {
|
||||
|
@ -29,11 +29,11 @@
|
||||
}
|
||||
|
||||
.red {
|
||||
text-color: red;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.green {
|
||||
text-color: green;
|
||||
color: green;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
@ -63,7 +63,9 @@
|
||||
% else:
|
||||
<em>
|
||||
No OpenAccess version found.
|
||||
% if v["sharable"]:
|
||||
% if v["sharable"] is not None:
|
||||
<strong>OpenAccess policy is unknown.</strong>
|
||||
% elif v["sharable"]:
|
||||
<strong class="green">It could be shared.</strong>
|
||||
% else:
|
||||
<strong class="red">It could not be shared.</strong>
|
||||
|
Loading…
Reference in New Issue
Block a user