fixup citation weights for ss import
This commit is contained in:
parent
88e397d197
commit
f1bb21c9ad
|
@ -152,9 +152,10 @@ module.exports = async (req, res) => {
|
|||
|
||||
console.log('references count:', paper.references.length);
|
||||
|
||||
const eachCitationWeightPercent = Math.floor(PPM_TO_CITATIONS / paper.references.length);
|
||||
const references = paper.references.filter((x) => !!x.paperId);
|
||||
const eachCitationWeightPercent = Math.floor(PPM_TO_CITATIONS / references.length);
|
||||
const citations = await Promise.mapSeries(
|
||||
paper.references.filter((x) => !!x.paperId),
|
||||
references,
|
||||
async (citedPaper) => {
|
||||
// We need to fetch this paper so we can generate the post we WOULD add to the forum.
|
||||
// That way, if we later add the cited paper to the blockchain it will have the correct hash.
|
||||
|
|
Loading…
Reference in New Issue