incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g..@apache.org
Subject svn commit: r1447579 - /incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/model.py
Date Tue, 19 Feb 2013 03:21:23 GMT
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])



Mime
View raw message