abrignoni / abrignoni/iLEAPP

Bug: get_data_list_with_media crashes on invalid media IDs

Đang mở
#1,237 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Python
Star
1.2k
Fork
303
Merge trung bình
4 giờ 32 phút
Pull request đã merge (30 ngày)
216

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.