You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by gj...@apache.org on 2013/02/19 04:21:23 UTC

svn commit: r1447579 - /incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/model.py

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])