diff options
-rw-r--r-- | ishtar_common/qfield_functions.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ishtar_common/qfield_functions.py b/ishtar_common/qfield_functions.py index 36ab5c541..80c535999 100644 --- a/ishtar_common/qfield_functions.py +++ b/ishtar_common/qfield_functions.py @@ -696,11 +696,14 @@ def populating_layer_sites_query(layer, table_cols, col_names, datas): # Completion of the list of Context_Records linked to the extracted Sites list_cr = [] for name in list_ope: - ope, __ = Operation.objects.get_or_create(code_patriarche=name) - search = ContextRecord.objects.filter(operation=ope) - for cr in search: - if cr.label not in list_cr: - list_cr.append(cr.label) + try: + ope, __ = Operation.objects.get_or_create(code_patriarche=name) + search = ContextRecord.objects.filter(operation=ope) + for cr in search: + if cr.label not in list_cr: + list_cr.append(cr.label) + except: + pass return list_ope, list_cr |