From ffd93278d9c3b43a66ef95a5bafdcc56c60cf9af Mon Sep 17 00:00:00 2001 From: Christoffer Viken Date: Thu, 16 Mar 2017 18:54:42 +0000 Subject: [PATCH] Added support for new RFID format --- db.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/db.py b/db.py index 95905eb..1255d96 100644 --- a/db.py +++ b/db.py @@ -13,13 +13,13 @@ Session = sessionmaker(bind=engine) class User(Base): __tablename__ = 'users' name = Column(String(10), primary_key=True) - card = Column(String(10)) - rfid = Column(String(10)) + card = Column(String(20)) + rfid = Column(String(20)) credit = Column(Integer) name_re = r"[a-z]+" card_re = r"(([Nn][Tt][Nn][Uu])?[0-9]+)?" - rfid_re = r"[0-9]*" + rfid_re = r"[0-9a-fA-F]*" def __init__(self, name, card, rfid=None, credit=0): self.name = name