From patchwork Mon Sep 19 22:39:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 672021 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sdLTk2gmQz9s5w for ; Tue, 20 Sep 2016 08:41:30 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3sdLTk18HzzDsgg for ; Tue, 20 Sep 2016 08:41:30 +1000 (AEST) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Received: from BLU004-OMC3S35.hotmail.com (blu004-omc3s35.hotmail.com [65.55.116.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3sdLSl0Yt7zDsgC for ; Tue, 20 Sep 2016 08:40:38 +1000 (AEST) Received: from BLU437-SMTP26 ([65.55.116.73]) by BLU004-OMC3S35.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Mon, 19 Sep 2016 15:40:35 -0700 X-TMN: [eAmt67XfFzFeAibBLPJGVhbTVdgqi7si] X-Originating-Email: [stephenfinucane@hotmail.com] Message-ID: From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH 13/13] trivial: Fix incorrectly subclassed 'save's Date: Mon, 19 Sep 2016 23:39:01 +0100 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1474324741-3055-1-git-send-email-stephenfinucane@hotmail.com> References: <1474324741-3055-1-git-send-email-stephenfinucane@hotmail.com> X-OriginalArrivalTime: 19 Sep 2016 22:40:33.0079 (UTC) FILETIME=[D4D61470:01D212C6] MIME-Version: 1.0 X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" Signed-off-by: Stephen Finucane --- patchwork/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patchwork/models.py b/patchwork/models.py index e067327..96805d1 100644 --- a/patchwork/models.py +++ b/patchwork/models.py @@ -415,7 +415,7 @@ class Patch(Submission): for tag in tags: self._set_tag(tag, counter[tag]) - def save(self, **kwargs): + def save(self, *args, **kwargs): if not hasattr(self, 'state') or not self.state: self.state = get_default_initial_patch_state() @@ -686,7 +686,7 @@ class EmailConfirmation(models.Model): def is_valid(self): return self.date + self.validity > datetime.datetime.now() - def save(self): + def save(self, *args, **kwargs): limit = 1 << 32 if not self.key: key = '%s%s%d' % (self.user, self.email, random.randint(0, limit))