Skip to content

fix report generation crash and pull descriptions from commons api#536

Open
ayushshukla1807 wants to merge 1 commit into
hatnote:masterfrom
ayushshukla1807:feat/final-report-commons-metadata
Open

fix report generation crash and pull descriptions from commons api#536
ayushshukla1807 wants to merge 1 commit into
hatnote:masterfrom
ayushshukla1807:feat/final-report-commons-metadata

Conversation

@ayushshukla1807

Copy link
Copy Markdown
Contributor

Fix: Final Campaign Report generation and missing metadata

While testing the final campaign report generation, I noticed the process would crash due to a broken to_dict() call on the Entry model inside build_campaign_report.

I have resolved the crash by switching to the correct to_details_dict(with_uploader=True).

Additionally, the report was missing the image descriptions (as noted in the TODO.md). Since we don't store the full Commons description in our DB, I added a lightweight helper to fetch the extmetadata directly from the Wikimedia Commons API to dynamically inject the description into the final JSON output.

Tested locally and the final report now generates flawlessly with the missing metadata included!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant