aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--migrations/versions/17dcb75f3fe_changed_the_type_of_the_column_last_.py23
-rw-r--r--migrations/versions/25ca960a207_mv_icons_from_feed_tbl_to_icon_tbl.py5
-rw-r--r--newspipe/web/views/feed.py2
3 files changed, 14 insertions, 16 deletions
diff --git a/migrations/versions/17dcb75f3fe_changed_the_type_of_the_column_last_.py b/migrations/versions/17dcb75f3fe_changed_the_type_of_the_column_last_.py
index a6aeb8c9..7aea3040 100644
--- a/migrations/versions/17dcb75f3fe_changed_the_type_of_the_column_last_.py
+++ b/migrations/versions/17dcb75f3fe_changed_the_type_of_the_column_last_.py
@@ -18,15 +18,14 @@ from alembic import op
def upgrade():
unix_start = datetime(1970, 1, 1)
- if "sqlite" not in conf.SQLALCHEMY_DATABASE_URI:
- op.drop_column("feed", "last_modified")
- op.add_column(
- "feed",
- sa.Column(
- "last_modified",
- sa.String(),
- nullable=True,
- default=unix_start,
- server_default=str(unix_start),
- ),
- )
+ op.drop_column("feed", "last_modified")
+ op.add_column(
+ "feed",
+ sa.Column(
+ "last_modified",
+ sa.String(),
+ nullable=True,
+ default=unix_start,
+ server_default=str(unix_start),
+ ),
+ )
diff --git a/migrations/versions/25ca960a207_mv_icons_from_feed_tbl_to_icon_tbl.py b/migrations/versions/25ca960a207_mv_icons_from_feed_tbl_to_icon_tbl.py
index 333f6727..0712dcb2 100644
--- a/migrations/versions/25ca960a207_mv_icons_from_feed_tbl_to_icon_tbl.py
+++ b/migrations/versions/25ca960a207_mv_icons_from_feed_tbl_to_icon_tbl.py
@@ -23,6 +23,5 @@ def upgrade():
sa.PrimaryKeyConstraint("url"),
)
op.add_column("feed", sa.Column("icon_url", sa.String(), nullable=True))
- if "sqlite" not in conf.SQLALCHEMY_DATABASE_URI:
- op.create_foreign_key(None, "feed", "icon", ["icon_url"], ["url"])
- op.drop_column("feed", "icon")
+ op.create_foreign_key(None, "feed", "icon", ["icon_url"], ["url"])
+ op.drop_column("feed", "icon")
diff --git a/newspipe/web/views/feed.py b/newspipe/web/views/feed.py
index 11c91b52..5fa2070b 100644
--- a/newspipe/web/views/feed.py
+++ b/newspipe/web/views/feed.py
@@ -293,7 +293,7 @@ def process_form(feed_id=None):
del feed_attr["link"]
del feed_attr["site_link"]
# remove keys with empty strings
- feed_attr = {k: v for k, v in feed_attr.items() if v is not ""}
+ feed_attr = {k: v for k, v in feed_attr.items() if v != ""}
feed.update(feed_attr)
new_feed = feed_contr.create(**feed)
bgstack15