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

Proposed by Ines Almeida
Status: Merged
Approved by: Ines Almeida
Approved revision: 3e9e264aaa8b1f44e1cd952074ad43707552b8df
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~ines-almeida/launchpad:add-bug-webhooks/fix-failing-tests
Merge into: launchpad:master
Diff against target: 15 lines (+4/-0)
1 file modified
lib/lp/bugs/subscribers/bugactivity.py (+4/-0)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+445031@code.launchpad.net

Commit message

Add null-check to what-changed function

Description of the change

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

To post a comment you must log in.
Revision history for this message
Guruprasad (lgp171188) :
Revision history for this message
Ines Almeida (ines-almeida) :
Revision history for this message
Ines Almeida (ines-almeida) :
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/bugs/subscribers/bugactivity.py b/lib/lp/bugs/subscribers/bugactivity.py
2index c036186..d1d1bc8 100644
3--- a/lib/lp/bugs/subscribers/bugactivity.py
4+++ b/lib/lp/bugs/subscribers/bugactivity.py
5@@ -66,6 +66,10 @@ def what_changed(object_modified_event):
6 after = object_modified_event.object
7 fields = object_modified_event.edited_fields
8 changes = {}
9+
10+ if not fields:
11+ return changes
12+
13 for fieldname in fields:
14 # XXX 2011-01-21 gmb bug=705955:
15 # Sometimes, something (webservice, I'm looking at you

Subscribers

People subscribed via source and target branches

to status/vote changes: