Skip to content

Commit

Permalink
Backend: Fix schema json loading in leaderboard update API (Cloud-CV#…
Browse files Browse the repository at this point in the history
…3600)

* Fix leaderboard schema update API

* Fix tests
  • Loading branch information
Ram81 authored Oct 1, 2021
1 parent 4e9e347 commit 05e0638
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/challenges/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2131,6 +2131,8 @@ def get_or_update_leaderboard(request, leaderboard_pk):
leaderboard = get_leaderboard_model(leaderboard_pk)

if request.method == "PATCH":
if "schema" in request.data.keys():
request.data['schema'] = json.loads(request.data['schema'])
serializer = LeaderboardSerializer(
leaderboard, data=request.data, partial=True
)
Expand Down

0 comments on commit 05e0638

Please sign in to comment.