Skip to content
This repository has been archived by the owner on May 15, 2020. It is now read-only.

Commit

Permalink
Merge pull request #80 from kpn/feature/update-step-bugfix
Browse files Browse the repository at this point in the history
FIX: UUID is not JSON serializable, force to string
  • Loading branch information
mjholtkamp authored Feb 11, 2020
2 parents dbe1901 + c579ead commit 8b7b752
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion katka/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def call_endpoint(self, serializer):
data = {
"user": self.request.user.username,
"step": {
"public_identifier": serializer.instance.public_identifier,
"public_identifier": str(serializer.instance.public_identifier),
"status": serializer.validated_data["status"],
},
}
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_scmsteprun_update_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_partial_update_status_valid(self, client, logged_in_user, scm_step_run)
assert len(session.method_calls) == 1
post = session.method_calls[0][2]["json"]
assert post["user"] == "test_user"
assert post["step"]["public_identifier"] == scm_step_run.public_identifier
assert post["step"]["public_identifier"] == str(scm_step_run.public_identifier)
assert post["step"]["status"] == "success"

def test_partial_update_no_param(self, client, logged_in_user, scm_step_run):
Expand Down

0 comments on commit 8b7b752

Please sign in to comment.