← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~ines-almeida/launchpad:add-bug-webhooks/fix-failing-tests into launchpad:master

 

Ines Almeida has proposed merging ~ines-almeida/launchpad:add-bug-webhooks/fix-failing-tests into launchpad:master.

Commit message:
Add null-check to what-changed function

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/445031

This should fix the all (a few of the failures don't show a traceback, and pass locally, so I'll have to check) unit tests failing in http://lpbuildbot.canonical.com/builders/lp-devel-xenial/builds/3822/steps/shell/logs/summary
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:add-bug-webhooks/fix-failing-tests into launchpad:master.
diff --git a/lib/lp/bugs/subscribers/bugactivity.py b/lib/lp/bugs/subscribers/bugactivity.py
index c036186..d1d1bc8 100644
--- a/lib/lp/bugs/subscribers/bugactivity.py
+++ b/lib/lp/bugs/subscribers/bugactivity.py
@@ -66,6 +66,10 @@ def what_changed(object_modified_event):
     after = object_modified_event.object
     fields = object_modified_event.edited_fields
     changes = {}
+
+    if not fields:
+        return changes
+
     for fieldname in fields:
         # XXX 2011-01-21 gmb bug=705955:
         #     Sometimes, something (webservice, I'm looking at you

References