Skip to content

Commit

Permalink
refactor: Update NotificationSettings DTO to use camelCase for JSON keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Clon1998 committed Jul 16, 2024
1 parent daa0656 commit 31265cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mobileraker/data/dtos/mobileraker/notification_config_dto.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ def fromJSON(json: Dict[str, Any]) -> 'NotificationSettings':
cfg.progress_config = min(
50, round(prog_float * 100)) if prog_float > 0 else -1
cfg.state_config = json['states']
cfg.android_progressbar = json['android_progressbar'] if 'android_progressbar' in json else True
cfg.eta_sources = json['eta_sources'] if 'eta_sources' in json else []
cfg.android_progressbar = json['androidProgressbar'] if 'androidProgressbar' in json else True
if 'etaSources' in json:
cfg.eta_sources = json['etaSources']

return cfg

Expand Down

0 comments on commit 31265cb

Please sign in to comment.