From b53ee10a4ecfa811a5cf35794de0825e868d0110 Mon Sep 17 00:00:00 2001 From: Sebastian Riedel Date: Mon, 29 Jan 2024 15:49:42 +0100 Subject: [PATCH] Ignore keyword patterns --- lib/Cavil/Command/learn.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Cavil/Command/learn.pm b/lib/Cavil/Command/learn.pm index 3be05485ad..ec65ca77a2 100644 --- a/lib/Cavil/Command/learn.pm +++ b/lib/Cavil/Command/learn.pm @@ -71,7 +71,10 @@ sub _output_patterns ($self, $good, $bad) { my $count = my $last_id = 0; while (1) { - my $batch = $db->query('SELECT id, pattern FROM license_patterns WHERE id > ? ORDER BY id ASC LIMIT 100', $last_id); + my $batch = $db->query( + q{SELECT id, pattern FROM license_patterns + WHERE license != '' AND id > ? ORDER BY id ASC LIMIT 100}, $last_id + ); last if $batch->rows == 0; for my $hash ($batch->hashes->each) {