tilburgsciencehub / website

Learn to work more efficiently on empirical research projects.
https://tilburgsciencehub.com
38 stars 48 forks source link

Fix duplicate contributions on the contributors page #1073

Closed krzysztof99xd closed 7 months ago

krzysztof99xd commented 7 months ago

The reason why there were duplicates is that there were 2 loops that had the same first IF condition, they were checking pages in the section "topics". In the second condition, one of them checks again if the title is not equal to "topics" and the other one to "tutorials". The problem is that I could not find a section called "tutorials", is there one? Since the second condition for both loops is true, both of them were collecting the same contributions, and as a result, there were duplicates.

Please see the removed loop from lines 42 to 50. As mentioned above, there is no section "tutorials". Removing it removes duplicates.

netlify[bot] commented 7 months ago

Deploy Preview for unique-scone-f4eb67 ready!

Name Link
Latest commit d6777401b6434a7321bfa39541475e70055e20cf
Latest deploy log https://app.netlify.com/sites/unique-scone-f4eb67/deploys/65ce4788901f730007ffd6d8
Deploy Preview https://deploy-preview-1073--unique-scone-f4eb67.netlify.app/contributors/anabiancaluca
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

lachlandeer commented 7 months ago

perfect! thanks!