Skip to content

Commit

Permalink
fix css file access
Browse files Browse the repository at this point in the history
  • Loading branch information
vitor authored and vitor committed Sep 5, 2023
1 parent c5ec6b5 commit 557ea20
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/notification/email_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ def generate_email_content(self) -> str:
"""Generate HTML content to be sent by email based on
search_report dictionary
"""
with open('../report_style.css', 'r') as f:
current_directory = os.path.dirname(__file__)
parent_directory = os.path.dirname(current_directory)
file_path = os.path.join(parent_directory, 'report_style.css')

with open(file_path, 'r') as f:
blocks = [f'<style>\n{f.read()}</style>']

for group, results in self.search_report.items():
Expand Down

0 comments on commit 557ea20

Please sign in to comment.