Api: Add event severity details on appeal api#2685
Api: Add event severity details on appeal api#2685susilnem merged 2 commits intoproject/surge-eru-updatefrom
Conversation
api/serializers.py
Outdated
| "name", | ||
| "ifrc_severity_level", | ||
| "ifrc_severity_level_display", | ||
| "disaster_start_date", |
There was a problem hiding this comment.
Not sure if we need this.
We might need when severity level was changed.
api/serializers.py
Outdated
| country = MiniCountrySerializer(read_only=True) | ||
| dtype = DisasterTypeSerializer(read_only=True) | ||
| region = RegionSerializer(read_only=True) | ||
| event = EventMiniSerializer(source="appeal.event", read_only=True) |
There was a problem hiding this comment.
Changing this might cause issues in the frontend where we are using event id from this. Double check with FE @shreeyash07 , if this causes any issues.
There was a problem hiding this comment.
To be safe, we can rename this to event_details or something.
| "name", | ||
| "ifrc_severity_level", | ||
| "ifrc_severity_level_display", | ||
| "updated_at", |
There was a problem hiding this comment.
Can you verify if this is the field actually used to track the severity changes? or if incase we need this??
ifrc_severity_level_update_date
Line 818 in bd9d795
There was a problem hiding this comment.
We need to take this from the other model used to save history.
There was a problem hiding this comment.
ifrc_severity_level_update_date field tracks the date when the severity level changes. We don’t need this information for now, but I’ve added the field in the event details as it may be useful in the future.
631da5d to
0ba5f97
Compare
0ba5f97 to
597c8fa
Compare
Changes
id,nameseverity levelon appeal apiChecklist
Things that should succeed before merging.
Release
If there is a version update, make sure to tag the repository with the latest version.