fixed issue 1587:Mongodb error on id
This commit is contained in:
@@ -1 +1 @@
|
||||
Version 2.6.0-development+timestamp.2013.07.16.13.14.21
|
||||
Version 2.6.0-development+timestamp.2013.07.17.07.36.50
|
||||
|
||||
+2
-1
@@ -5540,8 +5540,9 @@ class MongoDBAdapter(NoSQLAdapter):
|
||||
filter = None
|
||||
if query:
|
||||
filter = self.expand(query)
|
||||
# do not try to update id fields to avoid backend errors
|
||||
modify = {'$set': dict((k.name, self.represent(v, k.type)) for
|
||||
k, v in fields)}
|
||||
k, v in fields if (not k.name in ("_id", "id")))}
|
||||
return modify, filter
|
||||
|
||||
def update(self, tablename, query, fields, safe=None):
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ def compare(a, b):
|
||||
|
||||
def md5_hash(text):
|
||||
""" Generate a md5 hash with the given text """
|
||||
return md5(text).hexdigest()
|
||||
return md5.new(text).hexdigest()
|
||||
|
||||
|
||||
def simple_hash(text, key='', salt='', digest_alg='md5'):
|
||||
|
||||
Reference in New Issue
Block a user