aboutsummaryrefslogtreecommitdiff
path: root/pl
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-05-06 23:35:03 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-05-06 23:35:03 +0200
commit2b750824f9d2ad871e970c70fa49a500f72d3f3c (patch)
treeb08053aab6a8a77994cb609fe96cdb3af4c2c72c /pl
parent0483e7cd4fba5f27a8a03bae302099006626aed8 (diff)
downloadEpisodeBrowser-2b750824f9d2ad871e970c70fa49a500f72d3f3c.tar.gz
Fix bug in maybe_assert_episode_datum.
Diffstat (limited to 'pl')
-rw-r--r--pl/episode_data.pl5
1 files changed, 4 insertions, 1 deletions
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)
).