|
@@ -222,6 +222,12 @@ abstract, preparing reccursiv calls" % (target, filters, relational_filters))
|
222
|
222
|
#@param upd_datas dict : datas to update (new values)
|
223
|
223
|
#@return int : Number of updated records
|
224
|
224
|
def update(self, target, filters, relational_filters, upd_datas):
|
|
225
|
+ for dname in upd_datas:
|
|
226
|
+ if isinstance(upd_datas[dname], set):
|
|
227
|
+ #pymongo raises :
|
|
228
|
+ #bson.errors.InvalidDocument: Cannot encode object: {...}
|
|
229
|
+ #with sets
|
|
230
|
+ upd_datas[dname] = list(upd_datas[dname])
|
225
|
231
|
res = self.__update_no_backref(target, filters, relational_filters,
|
226
|
232
|
upd_datas)
|
227
|
233
|
self.__update_backref_filtered(target, filters, relational_filters,
|