Skip to content

Commit

Permalink
Merge pull request #4189 from unicef/fix/203671
Browse files Browse the repository at this point in the history
Strip name in copy targeting
  • Loading branch information
patryk-dabrowski authored Sep 3, 2024
2 parents ffa5514 + 453efaa commit 4a09698
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/hct_mis_api/apps/targeting/mutations.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def mutate_and_get_payload(cls, _root: Any, info: Any, **kwargs: Any) -> "CopyTa
try:
user = info.context.user
target_population_data = kwargs["target_population_data"]
name = target_population_data.pop("name")
name = target_population_data.pop("name").strip()
target_id = utils.decode_id_string(target_population_data.pop("id"))
target_population = TargetPopulation.objects.get(id=target_id)
program = target_population.program
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def test_copy_with_individual_ids(self, _: Any, permissions: List[Permissions])
"input": {
"targetPopulationData": {
"id": self.id_to_base64(self.target_population_with_individual_ids.id, "TargetPopulationNode"),
"name": "Test New Copy Name",
"name": " Test New Copy Name ",
"programCycleId": self.id_to_base64(self.cycle.id, "ProgramCycleNode"),
}
}
Expand Down

0 comments on commit 4a09698

Please sign in to comment.