Skip to content

Commit

Permalink
Merge pull request #116 from Progress1/regex
Browse files Browse the repository at this point in the history
Fix: time zone displacement out of range error when time > 16:00 + wr…
  • Loading branch information
milankowww authored Feb 3, 2023
2 parents 4bb1c00 + 7cc9bde commit 9403d56
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ services:

TZ: "${TZ}"
DEBUG: "true"
DEBUG_SQL: "false"
# to allow automatic initialisation of collectors/presenters/publishers
COLLECTOR_PRESENTER_PUBLISHER_API_KEY: "${COLLECTOR_PRESENTER_PUBLISHER_API_KEY}"
labels:
Expand Down
1 change: 1 addition & 0 deletions src/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class Config(object):
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://{user}:{pw}@{url}/{db}'.format(user=DB_USER, pw=DB_PASSWORD,
url=DB_URL, db=DB_DATABASE)
SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHEMY_ECHO = (os.getenv("DEBUG_SQL", "false").lower() == "true") # DEBUG SQL Queries

if "DB_POOL_SIZE" in os.environ:
DB_POOL_SIZE = os.getenv("DB_POOL_SIZE")
Expand Down
2 changes: 0 additions & 2 deletions src/core/model/news_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ def latest_collected(cls):
@classmethod
def get_all_news_items_data(cls, limit):
limit = datetime.strptime(limit, '%d.%m.%Y - %H:%M')
limit = datetime.strftime(limit, '%Y-%m-%d - %H:%M')

news_items_data = cls.query.filter(cls.collected > limit).all()
news_items_data_schema = NewsItemDataSchema(many=True)
return news_items_data_schema.dump(news_items_data)
Expand Down

0 comments on commit 9403d56

Please sign in to comment.