~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/model/bugwatch.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-08-11 13:45:40 UTC
  • mfrom: (13649.1.2 bug-655239)
  • Revision ID: launchpad@pqm.canonical.com-20110811134540-g7cm4o2ye055rb52
[r=abentley][bug=655239] Attempting to delete a BugWatch that has
        BugWatchActivity items will no longer cause an OOPS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
233
233
            not self.getImportedBugMessages().is_empty()):
234
234
            raise BugWatchDeletionError(
235
235
                "Can't delete bug watches linked to tasks or comments.")
 
236
        # Remove any BugWatchActivity entries for this bug watch.
 
237
        self.activity.remove()
236
238
        # XXX 2010-09-29 gmb bug=647103
237
239
        #     We flush the store to make sure that errors bubble up and
238
240
        #     are caught by the OOPS machinery.