projects
/
osm
/
RO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
adding ns_lcm_op_occs instantiate terminate action (primitive)
[osm/RO.git]
/
lcm
/
osm_common
/
dbmongo.py
diff --git
a/lcm/osm_common/dbmongo.py
b/lcm/osm_common/dbmongo.py
index
6bc35a5
..
46e4dc8
100644
(file)
--- a/
lcm/osm_common/dbmongo.py
+++ b/
lcm/osm_common/dbmongo.py
@@
-167,12
+167,12
@@
class DbMongo(DbBase):
try:
collection = self.db[table]
rows = collection.update_one(self._format_filter(filter), {"$set": update_dict})
try:
collection = self.db[table]
rows = collection.update_one(self._format_filter(filter), {"$set": update_dict})
- if rows.
updat
ed_count == 0:
+ if rows.
match
ed_count == 0:
if fail_on_empty:
raise DbException("Not found any {} with filter='{}'".format(table[:-1], filter),
HTTPStatus.NOT_FOUND)
return None
if fail_on_empty:
raise DbException("Not found any {} with filter='{}'".format(table[:-1], filter),
HTTPStatus.NOT_FOUND)
return None
- return {"
deleted": rows.delet
ed_count}
+ return {"
modified": rows.modifi
ed_count}
except Exception as e: # TODO refine
raise DbException(str(e))
except Exception as e: # TODO refine
raise DbException(str(e))
@@
-186,6
+186,6
@@
class DbMongo(DbBase):
raise DbException("Not found any {} with filter='{}'".format(table[:-1], _filter),
HTTPStatus.NOT_FOUND)
return None
raise DbException("Not found any {} with filter='{}'".format(table[:-1], _filter),
HTTPStatus.NOT_FOUND)
return None
- return {"replace": rows.modified_count}
+ return {"replace
d
": rows.modified_count}
except Exception as e: # TODO refine
raise DbException(str(e))
except Exception as e: # TODO refine
raise DbException(str(e))