From c72ab5daa32d92d8a24ab15349ff1571e7fe2189 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 9 May 2013 20:07:40 +0000 Subject: [PATCH] Added alternative names for 2 iana states which seems to have changed name since the code was originally deployed. Also added a guard against sending state change emails when the iana state hasn't actually changed. - Legacy-Id: 5718 --- ietf/sync/iana.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ietf/sync/iana.py b/ietf/sync/iana.py index 7e0427938..2284a30ad 100644 --- a/ietf/sync/iana.py +++ b/ietf/sync/iana.py @@ -127,9 +127,11 @@ def update_history_with_changes(changes, send_email=True): for s in State.objects.filter(used=True, type=StateType.objects.get(slug="draft-iana-review"))) states["review"] = { "IANA Review Needed": slookup["need-rev"], + "IANA - Review Needed": slookup["need-rev"], "IANA OK - Actions Needed": slookup["ok-act"], "IANA OK - No Actions Needed": slookup["ok-noact"], "IANA Not OK": slookup["not-ok"], + "IANA - Not OK": slookup["not-ok"], "Version Changed - Review Needed": slookup["changed"], } @@ -189,7 +191,7 @@ def update_history_with_changes(changes, send_email=True): save_document_in_history(doc) doc.set_state(state) - if send_email: + if send_email and (state != prev_state): email_state_changed(None, doc, "IANA %s state changed to %s" % (kind, state.name)) email_owner(None, doc, doc.ad, system, "IANA %s state changed to %s" % (kind, state.name))