now marked as learning but without picture are not displayed

This commit is contained in:
leca 2024-05-17 00:33:26 +03:00
parent 25be0e416d
commit c6135a6a6b
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ impl MemoryCardsGameScene {
fn generate_card() -> Option<CardDisplay> {
let connection = Connection::open(get_db_path()).unwrap();
let mut stmt = connection.prepare("SELECT imagename, hieroglyph, reading, translation FROM cards WHERE is_learning = TRUE ORDER BY RANDOM() LIMIT 1").unwrap();
let mut stmt = connection.prepare("SELECT imagename, hieroglyph, reading, translation FROM cards WHERE is_learning = TRUE AND imagename != '' ORDER BY RANDOM() LIMIT 1").unwrap();
let random_card_iter = stmt
.query_map((), |row| {
Ok(Card::new(