diff mbox

[Branch,~linaro-validation/lava-dashboard/trunk] Rev 234: Handle DashboardAPI.make_stream(name=None) properly

Message ID 20110629094916.28520.22583.launchpad@loganberry.canonical.com
State Accepted
Headers show

Commit Message

Zygmunt Krynicki June 29, 2011, 9:49 a.m. UTC
Merge authors:
  Dave Pigott (dpigott)
Related merge proposals:
  https://code.launchpad.net/~dpigott/lava-dashboard/Bug771182-None-fix/+merge/63535
  proposed by: Zygmunt Krynicki (zkrynicki)
  review: Approve - Paul Larson (pwlars)
------------------------------------------------------------
revno: 234 [merge]
fixes bug(s): https://launchpad.net/bugs/771182
committer: Zygmunt Krynicki <zygmunt.krynicki@linaro.org>
branch nick: merge
timestamp: Wed 2011-06-29 10:46:08 +0100
message:
  Handle DashboardAPI.make_stream(name=None) properly
  
  Work around bug https://bugs.launchpad.net/lava-dashboard/+bug/771182. Older
  clients would send None as the name and this would trigger an IntegrityError to
  be raised by BundleStream.objects.create() which in turn would be captured by
  the fault handler and reported as an unrelated issue to the user. Let's work
  around that by using an empty string instead.
modified:
  dashboard_app/xmlrpc.py


--
lp:lava-dashboard
https://code.launchpad.net/~linaro-validation/lava-dashboard/trunk

You are subscribed to branch lp:lava-dashboard.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dashboard/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'dashboard_app/xmlrpc.py'
--- dashboard_app/xmlrpc.py	2011-05-18 16:01:46 +0000
+++ dashboard_app/xmlrpc.py	2011-06-29 09:46:08 +0000
@@ -411,6 +411,14 @@ 
         ---------------
         0.3
         """
+        # Work around bug https://bugs.launchpad.net/lava-dashboard/+bug/771182
+        # Older clients would send None as the name and this would trigger an
+        # IntegrityError to be raised by BundleStream.objects.create() below
+        # which in turn would be captured by the fault handler and reported as
+        # an unrelated issue to the user. Let's work around that by using an
+        # empty string instead.
+        if name is None:
+            name = ""
         try:
             user, group, slug, is_public, is_anonymous = BundleStream.parse_pathname(pathname)
         except ValueError as ex: