X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_common%2Fdbmemory.py;fp=osm_common%2Fdbmemory.py;h=d3b401934b108bbe7f463e50ec96efa88435e889;hb=70911f00b815917f2fd0946caa36c1bbc88e890e;hp=0c720e1338a3496071d7dc1601ffb6f7f1482928;hpb=77e2d6a4764ea516196f6f89d1de61ece8879625;p=osm%2Fcommon.git diff --git a/osm_common/dbmemory.py b/osm_common/dbmemory.py index 0c720e1..d3b4019 100644 --- a/osm_common/dbmemory.py +++ b/osm_common/dbmemory.py @@ -372,7 +372,7 @@ class DbMemory(DbBase): raise DbException("Not found entry with _id='{}'".format(q_filter), HTTPStatus.NOT_FOUND) return None - def set_list(self, table, q_filter, update_dict, fail_on_empty=True, unset=None, pull=None, push=None): + def set_list(self, table, q_filter, update_dict, unset=None, pull=None, push=None): with self.lock: updated = 0 found = 0 @@ -380,8 +380,8 @@ class DbMemory(DbBase): found += 1 if self._update(db_item, update_dict, unset=unset, pull=pull, push=push): updated += 1 - if not found and fail_on_empty: - raise DbException("Not found entry with '{}'".format(q_filter), HTTPStatus.NOT_FOUND) + # if not found and fail_on_empty: + # raise DbException("Not found entry with '{}'".format(q_filter), HTTPStatus.NOT_FOUND) return {"updated": updated} if found else None def replace(self, table, _id, indata, fail_on_empty=True):