diff options
-rw-r--r-- | pl/episode_data.pl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pl/episode_data.pl b/pl/episode_data.pl index 557cddf..11bc22a 100644 --- a/pl/episode_data.pl +++ b/pl/episode_data.pl @@ -52,7 +52,11 @@ rate_episode(Ep, R) :- dif(R, 0), ( episode_rating(Ep, R) -> true - ; assert_episode_rating(Ep, R) + ; ( episode_rating(Ep, _) + -> retractall_episode_rating(Ep, _) + ; true + ), + assert_episode_rating(Ep, R) ). tv_original(Ep) :- episode_datum(Ep, 'Source', 'TV Original'). |