Skip to content

Commit

Permalink
fixup! improved automatic points adding script
Browse files Browse the repository at this point in the history
  • Loading branch information
struan committed Jul 30, 2024
1 parent da7851a commit 4c75e62
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crowdsourcer/management/commands/add_automatic_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ def add_arguments(self, parser):
help="marking stage to add responses to",
)

parser.add_argument(
"--update_existing_responses",
action="store_true",
help="Always update existings responses",
)

parser.add_argument(
"--commit", action="store_true", help="Commits changes to DB"
)
Expand Down Expand Up @@ -139,6 +145,7 @@ def handle(
stage: str = "",
session: str = "",
option_map: str = "",
update_existing_responses: bool = False,
*args,
**kwargs,
):
Expand Down Expand Up @@ -375,7 +382,7 @@ def handle(
if point.get("evidence", None) is not None:
r.public_notes = point["evidence"]
r.save()
elif override_response:
elif override_response or update_existing_responses:
responses_overidden += 1
self.print_info(
f"overriding response for {council.name} for {question.number_and_part}, {question.section.title}",
Expand Down

0 comments on commit 4c75e62

Please sign in to comment.