Skip to content

Commit

Permalink
[IMPORT] update import report (#3223)
Browse files Browse the repository at this point in the history
* feat(import, report): refact of the report design
* feat(import, report): change/add condition to display certain element in the import report pdf
* fix(import, report) : fix inversion between source and destination field + hide field not mapped
  • Loading branch information
jacquesfize authored Oct 11, 2024
1 parent 523f48d commit 9d58d07
Show file tree
Hide file tree
Showing 5 changed files with 221 additions and 177 deletions.
11 changes: 1 addition & 10 deletions backend/geonature/core/imports/routes/imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,15 +660,7 @@ def export_pdf(scope, imprt):
"""
if not imprt.has_instance_permission(scope):
raise Forbidden
ctx = imprt.as_dict(
fields=[
"errors",
"errors.type",
"errors.entity",
"dataset.dataset_name",
"destination.statistics_labels",
]
)
ctx = imprt.as_dict()

ctx["map"] = request.form.get("map")
if ctx["map"] == "undefined":
Expand All @@ -685,7 +677,6 @@ def export_pdf(scope, imprt):
ctx["url"] = "/".join(url_list)

ctx["statistics_formated"] = {}

for label_dict in ctx["destination"]["statistics_labels"]:
key = label_dict["value"]
if label_dict["key"] in ctx["statistics"]:
Expand Down
Loading

0 comments on commit 9d58d07

Please sign in to comment.