Skip to content

Commit

Permalink
Merge pull request #459 from ColonelThirtyTwo/fix-project-report-extr…
Browse files Browse the repository at this point in the history
…a-fields

Fix project extra fields not being processed on project reports
  • Loading branch information
chrismaddalena authored Jun 17, 2024
2 parents d344d6f + c7abc5b commit ce19c59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
11 changes: 4 additions & 7 deletions ghostwriter/modules/reportwriter/project/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ def map_rich_texts(self):
# Fields on Project
ExportProjectBase.process_projects_richtext(self, base_context, rich_text_context)

# Project
base_context["project"]["note_rt"] = self.create_lazy_template(
"project note",
base_context["project"]["note"],
rich_text_context,
)

return base_context

@staticmethod
Expand Down Expand Up @@ -90,6 +83,10 @@ def process_projects_richtext(
rich_text_context
)

# Project
base_context["project"]["note_rt"] = ex.create_lazy_template("the project note", base_context["project"]["note"], rich_text_context)
ex.process_extra_fields("the project", base_context["project"]["extra_fields"], Project, rich_text_context)

# Assignments
for assignment in base_context["team"]:
if isinstance(assignment, dict):
Expand Down
4 changes: 0 additions & 4 deletions ghostwriter/modules/reportwriter/report/docx.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@

import logging

from docxtpl import RichText

from ghostwriter.modules.reportwriter.base.docx import ExportDocxBase
from ghostwriter.modules.reportwriter.report.base import ExportReportBase

logger = logging.getLogger(__name__)


class ExportReportDocx(ExportDocxBase, ExportReportBase):
def __init__(self, object, **kwargs):
Expand Down

0 comments on commit ce19c59

Please sign in to comment.