X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=osm_common%2Fdbmemory.py;h=e72db5b3db3d013124fdd8f590d17c6afa772c0b;hb=37e0914881759a514424ad5c0cc9278b9ced27a2;hp=272f6d6248be75b0b6889660fd39e3da1b657a88;hpb=f9b4b3dfbcc355bbea219b33862afe81b146c1f8;p=osm%2Fcommon.git diff --git a/osm_common/dbmemory.py b/osm_common/dbmemory.py index 272f6d6..e72db5b 100644 --- a/osm_common/dbmemory.py +++ b/osm_common/dbmemory.py @@ -126,26 +126,27 @@ class DbMemory(DbBase): for content_item in content: if key_list[key_next_index] == "ANYINDEX" and isinstance(v, dict): matches = True - for k2, v2 in target.items(): - k_new_list = k2.split(".") - new_operator = "eq" - if k_new_list[-1] in ( - "eq", - "ne", - "gt", - "gte", - "lt", - "lte", - "cont", - "ncont", - "neq", - ): - new_operator = k_new_list.pop() - if not recursive_find( - k_new_list, 0, content_item, new_operator, v2 - ): - matches = False - break + if target: + for k2, v2 in target.items(): + k_new_list = k2.split(".") + new_operator = "eq" + if k_new_list[-1] in ( + "eq", + "ne", + "gt", + "gte", + "lt", + "lte", + "cont", + "ncont", + "neq", + ): + new_operator = k_new_list.pop() + if not recursive_find( + k_new_list, 0, content_item, new_operator, v2 + ): + matches = False + break else: matches = recursive_find(