From 55adc3213a2da41eb684007c2902ea65eb75e198 Mon Sep 17 00:00:00 2001 From: pluja Date: Sun, 20 Sep 2020 12:53:25 +0200 Subject: [PATCH] Add debug + increase char limits --- app/models.py | 8 ++++---- app/routes.py | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/models.py b/app/models.py index 29d13b9..b30aa9d 100644 --- a/app/models.py +++ b/app/models.py @@ -147,7 +147,7 @@ class youtubeFollow(db.Model): __tablename__ = 'channel' id = db.Column(db.Integer, primary_key=True) channelId = db.Column(db.String(30), nullable=False) - channelName = db.Column(db.String(60)) + channelName = db.Column(db.String(100)) followers = db.relationship('User', secondary=channel_association, back_populates="youtubeFollowed") @@ -158,7 +158,7 @@ class youtubeFollow(db.Model): class twitterFollow(db.Model): __tablename__ = 'twitterAccount' id = db.Column(db.Integer, primary_key=True) - username = db.Column(db.String(30), nullable=False) + username = db.Column(db.String(100), nullable=False) followers = db.relationship('User', secondary=twitter_association, back_populates="twitterFollowed") @@ -170,8 +170,8 @@ class Post(db.Model): id = db.Column(db.Integer, primary_key=True) body = db.Column(db.String(540)) timestamp = db.Column(db.String(100)) - url = db.Column(db.String(250), unique=True) - username = db.Column(db.String(50)) + url = db.Column(db.String(550), unique=True) + username = db.Column(db.String(100)) user_id = db.Column(db.Integer, db.ForeignKey('user.id')) def __repr__(self): diff --git a/app/routes.py b/app/routes.py index ea930ed..726fa2c 100644 --- a/app/routes.py +++ b/app/routes.py @@ -259,7 +259,8 @@ def followYoutubeChannel(channelId): return True else: return False - except: + except Exception as e: + print(e) flash("Youtube: Couldn't follow {}. Already followed?".format(channelData[0]['name'])) return False