Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat: implement entry ID lookup by filename for jurors#550

Open
ayushshukla1807 wants to merge 1 commit into
hatnote:masterhatnote/montage:masterfrom
ayushshukla1807:feat/entry-lookup-by-filenameayushshukla1807/montage:feat/entry-lookup-by-filenameCopy head branch name to clipboard
Open

feat: implement entry ID lookup by filename for jurors#550
ayushshukla1807 wants to merge 1 commit into
hatnote:masterhatnote/montage:masterfrom
ayushshukla1807:feat/entry-lookup-by-filenameayushshukla1807/montage:feat/entry-lookup-by-filenameCopy head branch name to clipboard

Conversation

@ayushshukla1807

Copy link
Copy Markdown
Contributor

This PR clears a long-standing TODO in juror_endpoints.py by implementing a filename-based entry lookup for jurors.

Changes:

  • Added get_entry_by_name to UserDAO in rdb.py to support global entry lookups.
  • Implemented GET /juror/entry_lookup endpoint which accepts a filename parameter.
  • Added filename standardisation (removing File: prefix, handling spaces/underscores) to ensure robust lookups.
  • The endpoint returns full entry details including uploader information, width, height, and MediaWiki URLs.

This is a highly useful utility for jurors who need to cross-reference specific files by name rather than internal database IDs.

@ItsAbhinavM ItsAbhinavM left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ayushshukla1807 thank you for your contribution, the changes looks good but have some logical mistakes which can be fixed. The function get_entry_lookup doesn't route user_dao through JurorDAO due to which entry/user details outside the juror round can be returned and not-found filenames currently raises DoesNotExist than raising a standard {'status':'failure'} which shapes the rest of the function uses. Fixing these two would work in further steps on merging it.

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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.