aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Šmerkl <46304018+SveterCZE@users.noreply.github.com>2022-01-24 20:34:26 +0100
committerPetr Šmerkl <46304018+SveterCZE@users.noreply.github.com>2022-01-24 20:34:26 +0100
commita2a1ea822ba731b2de2e4336ab20acaa0f7e8bd4 (patch)
tree11eb9382f354288b623eb18e51726076db0bb7e4
parent33f8059f8cf03e40f2da2869c3a31704d74be6cd (diff)
parentf427a3317931c61471ca1442129bd33f9deb383d (diff)
downloadjustice-a2a1ea822ba731b2de2e4336ab20acaa0f7e8bd4.tar.gz
Merge branch 'remove-search-result-duplicates'
-rw-r--r--templates/duplicate_search.html19
-rw-r--r--templates/results_persons.html32
2 files changed, 35 insertions, 16 deletions
diff --git a/templates/duplicate_search.html b/templates/duplicate_search.html
new file mode 100644
index 0000000..0c96266
--- /dev/null
+++ b/templates/duplicate_search.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+ {% if test_list|length == 0 %}
+ {% set test_list = test_list.append(my_dict) %}
+ {% else %}
+ {% set duplicity_found = namespace(found=false) %}
+ {% for record in test_list %}
+ {% if record.ico == my_dict.ico and record.adresa == my_dict.adresa and record.funkce == my_dict.funkce %}
+ {% set duplicity_found.found = true %}
+ {% endif %}
+ {% endfor %}
+ {% if duplicity_found.found == false %}
+ {% set test_list = test_list.append(my_dict) %}
+ {% endif %}
+ {% endif %} \ No newline at end of file
diff --git a/templates/results_persons.html b/templates/results_persons.html
index fc90e08..58f9cc7 100644
--- a/templates/results_persons.html
+++ b/templates/results_persons.html
@@ -8,10 +8,10 @@
{% for row in results %}
{% set test_list = [] %}
{% for elem in row.statut_org_association %}
+ {% set my_dict = {} %}
{% if selection_method == "actual_results" and elem.vymaz_datum != 0 %}
{% set xxx = [] %}
{% else %}
- {% set my_dict = {} %}
{% set x = my_dict.__setitem__("adresa", elem.adresa) %}
{% set x = my_dict.__setitem__("funkce", elem.funkce) %}
{% set x = my_dict.__setitem__("nazev", elem.statutarni_organ.company.nazev) %}
@@ -21,15 +21,15 @@
{% set x = my_dict.__setitem__("soud", elem.statutarni_organ.company.soud) %}
{% set x = my_dict.__setitem__("zapis", elem.statutarni_organ.company.zapis) %}
{% set x = my_dict.__setitem__("pravni_forma", elem.statutarni_organ.company.current_legal_form_text()) %}
- {% set test_list = test_list.append(my_dict) %}
+ {% include 'duplicate_search.html' %}
{% endif %}
{% endfor %}
{% for elem in row.supervisory_board_member_association %}
+ {% set my_dict = {} %}
{% if selection_method == "actual_results" and elem.vymaz_datum != 0 %}
{% set xxx = [] %}
{% else %}
- {% set my_dict = {} %}
{% set x = my_dict.__setitem__("adresa", elem.adresa) %}
{% set x = my_dict.__setitem__("funkce", elem.funkce) %}
{% set x = my_dict.__setitem__("nazev", elem.dozorci_rada.company.nazev) %}
@@ -39,15 +39,15 @@
{% set x = my_dict.__setitem__("soud", elem.dozorci_rada.company.soud) %}
{% set x = my_dict.__setitem__("zapis", elem.dozorci_rada.company.zapis) %}
{% set x = my_dict.__setitem__("pravni_forma", elem.dozorci_rada.company.current_legal_form_text()) %}
- {% set test_list = test_list.append(my_dict) %}
- {% endif %}
- {% endfor %}
+ {% include 'duplicate_search.html' %}
+ {% endif %}
+ {% endfor %}
{% for elem in row.spolecnik_association %}
+ {% set my_dict = {} %}
{% if selection_method == "actual_results" and elem.vymaz_datum != 0 %}
{% set xxx = [] %}
{% else %}
- {% set my_dict = {} %}
{% set x = my_dict.__setitem__("adresa", elem.adresa) %}
{% set x = my_dict.__setitem__("funkce", "společník") %}
{% set x = my_dict.__setitem__("nazev", elem.company.nazev) %}
@@ -57,15 +57,15 @@
{% set x = my_dict.__setitem__("soud", elem.company.soud) %}
{% set x = my_dict.__setitem__("zapis", elem.company.zapis) %}
{% set x = my_dict.__setitem__("pravni_forma", elem.company.current_legal_form_text()) %}
- {% set test_list = test_list.append(my_dict) %}
- {% endif %}
- {% endfor %}
+ {% include 'duplicate_search.html' %}
+ {% endif %}
+ {% endfor %}
{% for elem in row.sole_shareholder_association %}
+ {% set my_dict = {} %}
{% if selection_method == "actual_results" and elem.vymaz_datum != 0 %}
{% set xxx = [] %}
{% else %}
- {% set my_dict = {} %}
{% set x = my_dict.__setitem__("adresa", elem.adresa) %}
{% set x = my_dict.__setitem__("funkce", "jediný akcionář") %}
{% set x = my_dict.__setitem__("nazev", elem.company.nazev) %}
@@ -75,15 +75,15 @@
{% set x = my_dict.__setitem__("soud", elem.company.soud) %}
{% set x = my_dict.__setitem__("zapis", elem.company.zapis) %}
{% set x = my_dict.__setitem__("pravni_forma", elem.company.current_legal_form_text()) %}
- {% set test_list = test_list.append(my_dict) %}
+ {% include 'duplicate_search.html' %}
{% endif %}
{% endfor %}
{% for elem in row.prokurista_association %}
+ {% set my_dict = {} %}
{% if selection_method == "actual_results" and elem.vymaz_datum != 0 %}
{% set xxx = [] %}
{% else %}
- {% set my_dict = {} %}
{% set x = my_dict.__setitem__("adresa", elem.adresa) %}
{% set x = my_dict.__setitem__("funkce", "prokurista") %}
{% set x = my_dict.__setitem__("nazev", elem.company.nazev) %}
@@ -93,9 +93,9 @@
{% set x = my_dict.__setitem__("soud", elem.company.soud) %}
{% set x = my_dict.__setitem__("zapis", elem.company.zapis) %}
{% set x = my_dict.__setitem__("pravni_forma", elem.company.current_legal_form_text()) %}
- {% set test_list = test_list.append(my_dict) %}
- {% endif %}
- {% endfor %}
+ {% include 'duplicate_search.html' %}
+ {% endif %}
+ {% endfor %}
{% for elem in row.ubo_association %}
{% if selection_method == "actual_results" and elem.vymaz_datum != 0 %}