Skip to content

Commit

Permalink
Fix tests by renaming planner_id back to id
Browse files Browse the repository at this point in the history
  • Loading branch information
L015H4CK committed Jul 22, 2024
1 parent c11a62c commit e2997d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/objects/c_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class PlannerSchema(ma.Schema):
planner_id = ma.fields.String()
planner_id = ma.fields.String(data_key='id')
name = ma.fields.String()
module = ma.fields.String()
params = ma.fields.Dict()
Expand All @@ -20,8 +20,8 @@ class PlannerSchema(ma.Schema):

@ma.pre_load
def fix_id(self, data, **_):
if 'id' in data:
data['planner_id'] = data.pop('id')
if 'planner_id' in data:
data['id'] = data.pop('planner_id')
return data

@ma.post_load()
Expand Down

0 comments on commit e2997d8

Please sign in to comment.