Skip to content

Commit

Permalink
avoid errors
Browse files Browse the repository at this point in the history
  • Loading branch information
delcroip committed Oct 3, 2024
1 parent f095aa8 commit 1a0deb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grievance_social_protection/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ def underscore_to_camel(name):

def model_obj_to_json(model_obj):
model_obj_dict = model_obj.__dict__
model_obj_dict.pop('_state')
model_obj_dict.pop('_state', None)
model_obj_dict = {underscore_to_camel(k): v for k, v in list(model_obj_dict.items())}
return json.dumps(model_obj_dict, cls=DjangoJSONEncoder)

0 comments on commit 1a0deb4

Please sign in to comment.