Skip to content

Commit

Permalink
refactor: ♻️ When exporting a ThermalEvent to .json, replace field "i…
Browse files Browse the repository at this point in the history
…nstances" by "thermal_events_instances" to match the related table name
  • Loading branch information
egrelier committed Sep 12, 2023
1 parent 8ab8d69 commit 1c71fa0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion thermal_events/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ class Meta:
class ThermalEventSchema(SQLAlchemyAutoSchema):
"""Schema for the ThermalEvent model."""

instances = RelatedList(Nested(ThermalEventInstanceSchema))
instances = RelatedList(
Nested(ThermalEventInstanceSchema), data_key="thermal_events_instances"
)

class Meta:
model = ThermalEvent
Expand Down

0 comments on commit 1c71fa0

Please sign in to comment.