Skip to content

Commit

Permalink
🩹 修复专用流量简化信息匹配 #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Cp0204 committed Jun 12, 2024
1 parent ad51201 commit e488220
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions telecom_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ def to_summary(self, data, phonenum=""):
common_balance = int(data["flowInfo"]["commonFlow"]["balance"])
common_total = common_use + common_balance
# 专用流量
special_use = int(data["flowInfo"]["specialAmount"]["used"])
special_balance = int(data["flowInfo"]["specialAmount"]["balance"])
special_use = int(data["flowInfo"]["specialAmount"]["used"]) if data["flowInfo"].get("specialAmount") else 0
special_balance = int(data["flowInfo"]["specialAmount"]["balance"]) if data["flowInfo"].get("specialAmount") else 0
special_total = special_use + special_balance
# 语音通话
voice_usage = int(data["voiceInfo"]["voiceDataInfo"]["used"])
Expand Down

0 comments on commit e488220

Please sign in to comment.