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)
|
canonical_doi = doi.to_canonical(doi_url)
|
||||||
sharable = doi.get_oa_policy(canonical_doi)
|
sharable = doi.get_oa_policy(canonical_doi)
|
||||||
if sharable is None:
|
if sharable is not None:
|
||||||
sharable = False
|
|
||||||
else:
|
|
||||||
sharable = "can" in sharable.values()
|
sharable = "can" in sharable.values()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -29,11 +29,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.red {
|
.red {
|
||||||
text-color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
.green {
|
.green {
|
||||||
text-color: green;
|
color: green;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
@ -63,7 +63,9 @@
|
|||||||
% else:
|
% else:
|
||||||
<em>
|
<em>
|
||||||
No OpenAccess version found.
|
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>
|
<strong class="green">It could be shared.</strong>
|
||||||
% else:
|
% else:
|
||||||
<strong class="red">It could not be shared.</strong>
|
<strong class="red">It could not be shared.</strong>
|
||||||
|
Loading…
Reference in New Issue
Block a user