From patchwork Fri Nov 16 01:02:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael-Doyle Hudson X-Patchwork-Id: 12882 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 8E9F023E13 for ; Fri, 16 Nov 2012 01:02:18 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id D4C28A18323 for ; Fri, 16 Nov 2012 01:02:17 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so2794247iej.11 for ; Thu, 15 Nov 2012 17:02:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :content-type:mime-version:x-launchpad-project:x-launchpad-branch :x-launchpad-message-rationale:x-launchpad-branch-revision-number :x-launchpad-notification-type:to:from:subject:message-id:date :reply-to:sender:errors-to:precedence:x-generated-by :x-launchpad-hash:x-gm-message-state; bh=le1230dLKW0T3T6ScshMSiKNxmV3CWoIpE07cmMWvZ0=; b=lVMmhwNcDuaJPKNfXsB8Lzc5K+HBYN3J4Y2RQI50g/QGO3Wfkr31ot+H5S6nuYLNpw Cq/OLVwyfBhoHS4BE3Up/SnERG/2dnrbRuDyQvMl8QPvw/AHQh6yRhe1a3AtR3bGMkne K+r9wld8+s5BQJPZP6BxRy0zEJd2Qj0S7rO0giwSAaoIc7h+SBaEWLisvT6b7NOjfdCZ eJNpRQE4PZvXclWQt5WBBKQJBB8yhaTciFJLSOHVbKkYqtBoCytF/5XsyjW5RKjuUN0O 1K9FPRAmVzzkGf8VWujeK3YpzV+Fe3kFYhKxjzMt80Qw9GGkOAsLEA3nuBLg2KyaC6T7 jC0A== Received: by 10.50.186.199 with SMTP id fm7mr1508589igc.62.1353027737326; Thu, 15 Nov 2012 17:02:17 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp877913igt; Thu, 15 Nov 2012 17:02:16 -0800 (PST) Received: by 10.216.194.38 with SMTP id l38mr1256863wen.80.1353027735543; Thu, 15 Nov 2012 17:02:15 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id dg1si19351060wib.0.2012.11.15.17.02.14 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Nov 2012 17:02:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1TZAJy-0004a8-Ld for ; Fri, 16 Nov 2012 01:02:14 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 8E2E3E028D for ; Fri, 16 Nov 2012 01:02:14 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-dashboard X-Launchpad-Branch: ~linaro-validation/lava-dashboard/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 360 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dashboard/trunk] Rev 360: * fix semantic merge conflict in renaming of get_restricted_object_or_404 Message-Id: <20121116010214.19125.98587.launchpad@ackee.canonical.com> Date: Fri, 16 Nov 2012 01:02:14 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="16272"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 1da20a4cd25bc5449d0267847f51ecd16592fb6b X-Gm-Message-State: ALoCoQlQ/RtuNm8tFLdgUP69N9GUZpwYCwN5x2z52kE5uxml1FZAdkb13hianU4tQV2fZ44AuAo8 ------------------------------------------------------------ revno: 360 committer: Michael Hudson-Doyle branch nick: trunk timestamp: Fri 2012-11-16 14:01:22 +1300 message: * fix semantic merge conflict in renaming of get_restricted_object_or_404 * fix stupid bug in importing test result attachments modified: dashboard_app/helpers.py dashboard_app/views/__init__.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 === modified file 'dashboard_app/helpers.py' --- dashboard_app/helpers.py 2012-11-07 03:21:52 +0000 +++ dashboard_app/helpers.py 2012-11-16 01:01:22 +0000 @@ -736,7 +736,7 @@ from dashboard_app.models import TestResult super(BundleFormatImporter_1_5, self)._import_test_results(c_test_run, s_test_run) for index, c_test_result in enumerate(c_test_run.get("test_results", []), 1): - if c_test_result.get("attributes", {}): + if c_test_result.get("attachments", {}): s_test_result = TestResult.objects.get( relative_index=index, test_run=s_test_run) self._import_test_result_attachments(c_test_result, s_test_result) === modified file 'dashboard_app/views/__init__.py' --- dashboard_app/views/__init__.py 2012-11-15 17:08:40 +0000 +++ dashboard_app/views/__init__.py 2012-11-16 01:01:22 +0000 @@ -569,7 +569,7 @@ parent=test_result_detail, needs=['pathname', 'content_sha1', 'analyzer_assigned_uuid', 'relative_index']) def result_attachment_list(request, pathname, content_sha1, analyzer_assigned_uuid, relative_index): - test_result = get_restricted_object_or_404( + test_result = get_restricted_object( TestResult, lambda test_result: test_result.test_run.bundle.bundle_stream, request.user, @@ -619,7 +619,7 @@ parent=result_attachment_list, needs=['pathname', 'content_sha1', 'analyzer_assigned_uuid', 'relative_index', 'pk']) def result_attachment_detail(request, pathname, content_sha1, analyzer_assigned_uuid, relative_index, pk): - attachment = get_restricted_object_or_404( + attachment = get_restricted_object( Attachment, lambda attachment: attachment.bundle.bundle_stream, request.user,