From 2b750824f9d2ad871e970c70fa49a500f72d3f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 6 May 2022 23:35:03 +0200 Subject: Fix bug in maybe_assert_episode_datum. --- pl/episode_data.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pl/episode_data.pl b/pl/episode_data.pl index 0246de0..af91d4e 100644 --- a/pl/episode_data.pl +++ b/pl/episode_data.pl @@ -87,7 +87,10 @@ maybe_assert_episode_title(Ep, Title) :- maybe_assert_episode_datum(Ep, Key, Value) :- ( episode_datum(Ep, Key, Value), ! - ; retract_episode_datum(Ep, Key, _), + ; ( episode_datum(Ep, Key, _) + -> retract_episode_datum(Ep, Key, _) + ; true + ), assert_episode_datum(Ep, Key, Value) ). -- cgit v1.2.3