Skip to content

Commit

Permalink
Fix round information being cleared unnecessarily
Browse files Browse the repository at this point in the history
  • Loading branch information
NikhilNarayana committed Oct 24, 2019
1 parent dcb2372 commit 01b3c11
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions meleeuploader/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,11 +702,8 @@ def __sa_update(self, data):
self._p2char.load_form(dict(selected=self.__p2chars))
except Exception as e:
print(e)
try:
self._p1.value = data.get('player1', self._p1.value)
self._p2.value = data.get('player2', self._p2.value)
except Exception as e:
print(e)
self._p1.value = data.get('player1', self._p1.value)
self._p2.value = data.get('player2', self._p2.value)
try:
for t in consts.match_types:
if t.lower() in data.get('match', "").lower():
Expand All @@ -720,9 +717,9 @@ def __sa_update(self, data):
sections = data.get('match', "").split(t)
prefix = sections[0].strip()
suffix = sections[1].strip()
self._mtype.value = mtype
self._mprefix.value = prefix
self._msuffix.value = suffix
self._mtype.value = mtype or self._mtype.value
self._mprefix.value = prefix or self._mprefix.value
self._msuffix.value = suffix or self._msuffix.value
except Exception as e:
print(e)

Expand Down Expand Up @@ -767,9 +764,9 @@ def __sc_update(self, data):
mtype = t
prefix = ""
suffix = ""
self._mtype.value = mtype
self._mprefix.value = prefix
self._msuffix.value = suffix
self._mtype.value = mtype or self._mtype.value
self._mprefix.value = prefix or self._mprefix.value
self._msuffix.value = suffix or self._msuffix.value
except Exception as e:
print(e)

Expand Down Expand Up @@ -804,9 +801,9 @@ def __sm_update(self, data):
sections = data.get('rounds', [])[0].get('round', {}).get('name', "").split(t)
prefix = sections[0].strip()
suffix = sections[1].strip()
self._mtype.value = mtype
self._mprefix.value = prefix
self._msuffix.value = suffix
self._mtype.value = mtype or self._mtype.value
self._mprefix.value = prefix or self._mprefix.value
self._msuffix.value = suffix or self._msuffix.value
except Exception as e:
print(e)

Expand Down

0 comments on commit 01b3c11

Please sign in to comment.