Update functions.py
Browse files- functions.py +7 -2
functions.py
CHANGED
|
@@ -78,9 +78,14 @@ def generate_all_sections(data):
|
|
| 78 |
"""
|
| 79 |
sections_content = {}
|
| 80 |
|
|
|
|
|
|
|
|
|
|
| 81 |
# Retrieve sections based on report type
|
| 82 |
-
report_sections = get_report_sections(
|
| 83 |
-
|
|
|
|
|
|
|
| 84 |
# Call the respective function dynamically
|
| 85 |
section_content = call_dynamic_function(function_name, data)
|
| 86 |
|
|
|
|
| 78 |
"""
|
| 79 |
sections_content = {}
|
| 80 |
|
| 81 |
+
# Get the report type from data
|
| 82 |
+
report_type = data.get("report_type")
|
| 83 |
+
|
| 84 |
# Retrieve sections based on report type
|
| 85 |
+
report_sections = get_report_sections(report_type)
|
| 86 |
+
|
| 87 |
+
# Loop through each section and generate content
|
| 88 |
+
for section_name, function_name in report_sections:
|
| 89 |
# Call the respective function dynamically
|
| 90 |
section_content = call_dynamic_function(function_name, data)
|
| 91 |
|