Return-Path: X-Original-To: apmail-incubator-bloodhound-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-bloodhound-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D1029EC7C for ; Tue, 19 Feb 2013 03:21:48 +0000 (UTC) Received: (qmail 6670 invoked by uid 500); 19 Feb 2013 03:21:48 -0000 Delivered-To: apmail-incubator-bloodhound-commits-archive@incubator.apache.org Received: (qmail 6644 invoked by uid 500); 19 Feb 2013 03:21:48 -0000 Mailing-List: contact bloodhound-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: bloodhound-dev@incubator.apache.org Delivered-To: mailing list bloodhound-commits@incubator.apache.org Received: (qmail 6627 invoked by uid 99); 19 Feb 2013 03:21:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Feb 2013 03:21:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Feb 2013 03:21:46 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 5E1822388847; Tue, 19 Feb 2013 03:21:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1447579 - /incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/model.py Date: Tue, 19 Feb 2013 03:21:23 -0000 To: bloodhound-commits@incubator.apache.org From: gjm@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130219032123.5E1822388847@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: gjm Date: Tue Feb 19 03:21:22 2013 New Revision: 1447579 URL: http://svn.apache.org/r1447579 Log: fix for missing unique fields definition, allowing more than one record to be inserted - #336 Modified: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/model.py Modified: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/model.py URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/model.py?rev=1447579&r1=1447578&r2=1447579&view=diff ============================================================================== --- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/model.py (original) +++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/model.py Tue Feb 19 03:21:22 2013 @@ -144,7 +144,7 @@ class ModelBase(object): for k in self._meta['key_fields']]))): sdata = {'keys':','.join(["%s='%s'" % (k, self._data[k]) for k in self._meta['key_fields']])} - elif len(self.select(self._env, where = + elif self._meta['unique_fields'] and len(self.select(self._env, where = dict([(k,self._data[k]) for k in self._meta['unique_fields']]))): sdata = {'keys':','.join(["%s='%s'" % (k, self._data[k])