diff options
author | John Ankarström <john@ankarstrom.se> | 2022-05-06 23:35:03 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-05-06 23:35:03 +0200 |
commit | 2b750824f9d2ad871e970c70fa49a500f72d3f3c (patch) | |
tree | b08053aab6a8a77994cb609fe96cdb3af4c2c72c | |
parent | 0483e7cd4fba5f27a8a03bae302099006626aed8 (diff) | |
download | EpisodeBrowser-2b750824f9d2ad871e970c70fa49a500f72d3f3c.tar.gz |
Fix bug in maybe_assert_episode_datum.
-rw-r--r-- | pl/episode_data.pl | 5 |
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) ). |