Skip to content

Commit

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

* Fix tests
  • Loading branch information
Ram81 authored Oct 1, 2021
1 parent 8479e91 commit 58a95b0
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 58a95b0

Please sign in to comment.