diff --git a/diffido.py b/diffido.py index eff5ba8..30536f6 100755 --- a/diffido.py +++ b/diffido.py @@ -147,9 +147,11 @@ def run_job(id_=None, *args, **kwargs): if change_fraction < min_change: return # send notification - diff = get_diff(id_) + diff = get_diff(id_, {}).get('diff') + if not diff: + return send_email(to=email, subject='%s page changed' % schedule.get('title'), - body='changes:\n\n%s' % diff.get('diff')) + body='changes:\n\n%s' % diff) def safe_run_job(id_=None, *args, **kwargs): diff --git a/dist/index.html b/dist/index.html index 1fc5297..ebd78e9 100644 --- a/dist/index.html +++ b/dist/index.html @@ -3,18 +3,28 @@ {% block body %}