~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/app/browser/launchpadform.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-10-11 23:01:45 UTC
  • mfrom: (14129.2.1 bug-846163)
  • Revision ID: launchpad@pqm.canonical.com-20111011230145-63h3dlr1ukkcrkic
[r=gary][bug=846163] notifications are only removed if an explicitly
        specified empty list of notifications is given in a response

Show diffs side-by-side

added added

removed removed

Lines of Context:
147
147
        notifications = ([(notification.level, notification.message)
148
148
             for notification in request.response.notifications])
149
149
        if notifications:
150
 
            json_notifications = simplejson.dumps(notifications)
151
 
        else:
152
 
            json_notifications = simplejson.dumps(None)
153
 
        request.response.setHeader(
154
 
            'X-Lazr-Notifications', json_notifications)
 
150
            request.response.setHeader(
 
151
                'X-Lazr-Notifications', simplejson.dumps(notifications))
155
152
 
156
153
    def render(self):
157
154
        """Return the body of the response.