Skip to content

Commit

Permalink
fix(notifications GUI): Fix for KeyError "notifications" after click …
Browse files Browse the repository at this point in the history
…Kontaktdaten bearbeiten over GUI (#468)

* Draft for Code gen over GUI

first draft for running Code Gen over GUI

* Update tools/gui/qtcodegen.py

Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com>

* Update tools/gui/qtcodegen.py

Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com>

* Update tools/gui/qtcodegen.py

Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com>

* Update qtcodegen.py

* Thread cancel optimization

break while loops if stop called

* update now checking missing kontakt data

showing dialog to generate kontaktdaten if not present

* remove help icon

* added  CodeGEn Checkbox to Kontaktdaten

for now it just simply adds a XXXX dummy code to prevent code validation error (since it is not yet known )

* Update qtcodegen.py

* Update qtcodegen.py

* Revert "added  CodeGEn Checkbox to Kontaktdaten"

This reverts commit 3bf7b6f.

* added QtCodeGen to SubProcess

added QtCodeGen to SubProcess  because Impfterminservice is blocking  the Thread for termination

* adapted to mainline beta and further improvements

READY to TEST

* Update main.py

* Update utils.py

* Update qtcodegen.py

hard exit if cancelled

* Revert "Update main.py"

This reverts commit 8f082c5.

* file permission fix

git update-index --chmod=+x main.py under windows

* File permissin change revert

* Update gui.py

small rearrangment

* Update tools/gui/qtcodegen.py

THX

Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com>

* Update tools/gui/qtcodegen.py

Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com>

* Update tools/gui/qtcodegen.py

Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com>

* Update tools/gui/qtcodegen.py

Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com>

* keep all data kontaktdaten.json and just set a dummy code for code gen task

Rework to keep all data in kontaktdaten.json and just set a dummy code for code gen task if not file is present.

Also added checks if kontaktdaten edit fenster was cancelled to not run processes.

Also do a full validation check on input also if mode CODE_GENERIEREN, to have a valid config file

* Update gui.py

Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com>

* Update tools/gui/qtcodegen.py

Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com>

* Update gui.py

Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com>

* Update qtkontakt.py

changes from @Floskinner  added

* Revert "Merge branch 'beta' into ownBeta"

This reverts commit cb67518, reversing
changes made to 7e719ec.

* Revert "Revert "Merge branch 'beta' into ownBeta""

This reverts commit fe4d9f5.

* logger conflicts with redirect of qtgui

* added fix from TIm Reibe

* Added 3 Input Dlg retries if SMS PIN  was wrong

Change allows a wrong input of smspin and if code failed to accept the pin will be asked again

* Fix for keyerror in GUI (Kontaktdaten bearbeiten) with old file

tools\gui\qtkontakt.py", line 362, in __lade_alle_werte
    if kontaktdaten['notifications']:
KeyError: 'notifications'

Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com>
  • Loading branch information
IAmWebSA and Floskinner committed Jun 15, 2021
1 parent 76fb465 commit 180d0f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/gui/qtkontakt.py
Expand Up @@ -359,7 +359,9 @@ def __lade_alle_werte(self):
self.i_plz_wohnort.setText(kontaktdaten["kontakt"]["plz"])
self.i_wohnort.setText(kontaktdaten["kontakt"]["ort"])

self.__set_notifications(kontaktdaten['notifications'])
# Prüfen ob neuer key in kontaktdaten exisitiert
if "notifications" in kontaktdaten:
self.__set_notifications(kontaktdaten['notifications'])

try:
self.__set_zeitrahmen(kontaktdaten["zeitrahmen"])
Expand Down

0 comments on commit 180d0f6

Please sign in to comment.