Skip to content

Commit

Permalink
Only attempt to extract table, pk and param name if report datasource…
Browse files Browse the repository at this point in the history
… is not None
  • Loading branch information
manisandro committed Sep 13, 2024
1 parent 71d702a commit 89eb4a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/report_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def compile_report(self, report_filename, fill_params, tmpdir, resources, permit
self.logger.info("Report datasource: %s" % datasource)

# Try to extract primary key and table name
if not compile_subreport:
if not compile_subreport and datasource:
queryString = root.find(".//jasper:queryString", namespace)
if queryString is not None and data_table is None or data_pkey is None:
statement = re.sub(r"\s+", " ", queryString.text)
Expand Down

0 comments on commit 89eb4a7

Please sign in to comment.