Bug: get_data_list_with_media crashes on invalid media IDs

Open Beginner friendly
#1,237 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
backend, tooling

Research direction

The bug is in the function get_data_list_with_media in ilapfuncs.py. Start by locating this function and understanding its flow, particularly where it calls lava_get_full_media_info(). Add a check for a None result, log the invalid media ID, and ensure the field is emptied. Run any existing tests related to data parsing or media handling to verify the fix.

Written by the indexing model from the issue text.

Description

bug

get_data_list_with_media in ilapfuncs.py crashes with a TypeError if a module passes it an invalid media ID.

The function currently assumes any value in a media column is a valid reference from check_in_media. If a module developer makes a mistake and leaves a raw string (like a filename or an ID from a source DB) in that column (or puts an invalid value of any kind), the LAVA database lookup returns None, causing the crash.

The function needs to be more defensive. It should check the result of the lava_get_full_media_info() call. If the result is None, it should log the invalid ID it was trying to look up to console and then empty the field to prevent downstream issues. (i.e. don't pass on invalid data for LAVA to deal with.

Dominant language
Python
Stars
1.3k
Forks
310
Avg merge
3h 55m
Merged PRs (30d)
205

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from abrignoni/iLEAPP

All issues in abrignoni/iLEAPP

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.