Geraffel-Village / Beernary

Hard- & software stack for authentication, authorization and accounting of your private beer tap via RFID tokens. Created by the Geraffel gang, it runs reliably on very simple and cheap hardware.
GNU General Public License v2.0
6 stars 2 forks source link

Fix error-handling when when "None"-type for ID is given in database #16

Open SvenRoederer opened 5 years ago

SvenRoederer commented 5 years ago

@MicDiFebo made it to add the following record into the database:

+----------+-------------------+---------------------+
| id       | name              | timestamp           |
+----------+-------------------+---------------------+
| None     | Mic               | 2019-08-21 17:26:25 |

this caused a fatal excetion on startup of registry:

pi@b33rnary-c0unter:/home/b33rnary-c0unt3r/b33rn4rycounter $ ./B33rn4ryRegistry.py Traceback (most recent call last): File "./B33rn4ryRegistry.py", line 200, in window.refreshUserTable() File "./B33rn4ryRegistry.py", line 68, in refreshUserTable pID = str(int(row[0][2:], 16)) ValueError: invalid literal for int() with base 16: 'ne'