diff options
author | BonfaceKilz | 2020-08-26 17:38:13 +0300 |
---|---|---|
committer | BonfaceKilz | 2020-08-26 17:38:13 +0300 |
commit | 94f97127a9e451c7adb36613d090a612601b9d01 (patch) | |
tree | 1881f63313ef5cdb28c0fa2c3aba2ba07b62e5e4 /wqflask/wqflask/model.py | |
parent | 133db0e8dbc5a0812dc1f06402f2b788aecaef20 (diff) | |
download | genenetwork2-94f97127a9e451c7adb36613d090a612601b9d01.tar.gz |
Rename "unicode" to "str"
See: <https://docs.python.org/2/library/2to3.html#2to3fixer-unicode>
Diffstat (limited to 'wqflask/wqflask/model.py')
-rw-r--r-- | wqflask/wqflask/model.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wqflask/wqflask/model.py b/wqflask/wqflask/model.py index 38117a8e..a135761c 100644 --- a/wqflask/wqflask/model.py +++ b/wqflask/wqflask/model.py @@ -18,7 +18,7 @@ from wqflask.database import Base, init_db class User(Base): __tablename__ = "user" - id = Column(Unicode(36), primary_key=True, default=lambda: unicode(uuid.uuid4())) + id = Column(Unicode(36), primary_key=True, default=lambda: str(uuid.uuid4())) email_address = Column(Unicode(50), unique=True, nullable=False) # Todo: Turn on strict mode for Mysql @@ -120,7 +120,7 @@ class User(Base): class Login(Base): __tablename__ = "login" - id = Column(Unicode(36), primary_key=True, default=lambda: unicode(uuid.uuid4())) + id = Column(Unicode(36), primary_key=True, default=lambda: str(uuid.uuid4())) user = Column(Unicode(36), ForeignKey('user.id')) timestamp = Column(DateTime(), default=lambda: datetime.datetime.utcnow()) ip_address = Column(Unicode(39)) @@ -138,7 +138,7 @@ class Login(Base): class UserCollection(Base): __tablename__ = "user_collection" - id = Column(Unicode(36), primary_key=True, default=lambda: unicode(uuid.uuid4())) + id = Column(Unicode(36), primary_key=True, default=lambda: str(uuid.uuid4())) user = Column(Unicode(36), ForeignKey('user.id')) # I'd prefer this to not have a length, but for the index below it needs one |