mbridak / not1mm

Not1MM != N1MM, An amateur radio contest logger for Linux.
GNU General Public License v3.0
89 stars 18 forks source link

Crash when no Q's entered and ESC pressed causing non existing points to be recalculated. #62

Closed mbridak closed 7 months ago

mbridak commented 7 months ago
Traceback (most recent call last):
  File "/home/mbridak/Nextcloud/dev/not1mm/not1mm/__main__.py", line 1075, in keyPressEvent
    self.clearinputs()
  File "/home/mbridak/Nextcloud/dev/not1mm/not1mm/__main__.py", line 1257, in clearinputs
    score = self.contest.calc_score(self)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mbridak/Nextcloud/dev/not1mm/not1mm/plugins/winter_field_day.py", line 144, in calc_score
    _points = get_points(self)
              ^^^^^^^^^^^^^^^^
  File "/home/mbridak/Nextcloud/dev/not1mm/not1mm/plugins/winter_field_day.py", line 138, in get_points
    return int(result.get("Points", "0"))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
mbridak commented 7 months ago

{'Points': None}

mbridak commented 7 months ago

pushed fix with 23-12-4.