Skip to content
Snippets Groups Projects
Commit fc8e1ac8 authored by Dariusz Kędzierski's avatar Dariusz Kędzierski
Browse files

Title is no longer limited to 255 chars. Fix in votes

parent eb26a9e9
No related branches found
No related tags found
5 merge requests!456Release candidate v1 24,!230Setup monitoring with pghero,!135Enable postgres monitoring on CI server,!16Dk issue 3 concurrent block query rebase,!15Dk issue 3 concurrent block query
......@@ -160,7 +160,7 @@ def build_metadata():
sa.Table(
'hive_post_data', metadata,
sa.Column('id', sa.Integer, primary_key=True, autoincrement=False),
sa.Column('title', VARCHAR(255), nullable=False, server_default=''),
sa.Column('title', TEXT, nullable=False, server_default=''),
sa.Column('preview', VARCHAR(1024), nullable=False, server_default=''),
sa.Column('img_url', VARCHAR(1024), nullable=False, server_default=''),
sa.Column('body', TEXT, nullable=False, server_default=''),
......
......@@ -131,6 +131,7 @@ class Posts:
tags = filter(None, tags)
from funcy.seqs import distinct
tags = list(distinct(tags))[:5]
for tag in tags:
Tags.add_tag(result['id'], tag)
......
......@@ -122,7 +122,7 @@ class Votes:
DB.query(actual_query)
values.clear()
if len(values) >= 0:
if len(values) > 0:
values_str = ','.join(values)
actual_query = sql.format(values_str)
DB.query(actual_query)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment