Skip to content

Commit

Permalink
Responding to feedback. Changes to docstring and null type to empty s…
Browse files Browse the repository at this point in the history
…tring.

Minor rewording of the docstring for export_user_reports and changing the user_report_doc to default the customer field from null to the empty string
  • Loading branch information
JCantu248 committed Jul 1, 2021
1 parent 1cf8c64 commit 3c54a97
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/tools/gophish_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def get_application(rawEvent):


def export_user_reports(api, assessment_id):
"""Build and export a user_report JSON object for each campaign in an assessment."""
"""Build and export a user_report JSON file for each campaign in an assessment."""
campaign_ids = get_campaign_ids(api, assessment_id)

for campaign_id in campaign_ids:
Expand All @@ -270,7 +270,9 @@ def export_user_reports(api, assessment_id):
if first_report is None or click_time < first_report:
first_report = click_time

user_report_doc["customer"] = None
# The "customer" field is a placeholder added for operator convenience when
# working with the JSON file created.
user_report_doc["customer"] = ""
user_report_doc["assessment"] = assessment_id
# get_campaign_ids() returns integers, but user_report_doc["campaign"]
# expects a string
Expand Down

0 comments on commit 3c54a97

Please sign in to comment.