Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ckan/ckan
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Nov 29, 2024
2 parents 3e10554 + 7cab897 commit 822245e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ckanext/tracking/cli/tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,10 @@ def update_all(start_date: Optional[str] = None):
# No date given. See when we last have data for and get data
# from 2 days before then in case new data is available.
# If no date here then use 2011-01-01 as the start date
result = (
session.query(ts.tracking_date)
.order_by(desc(ts.tracking_date))
.first()
)
stmt = select(ts).order_by(desc(ts.tracking_date))
result = session.scalars(stmt).first()
if result:
date = result
date = result.tracking_date
date += datetime.timedelta(-2)
# convert date to datetime
combine = datetime.datetime.combine
Expand Down

0 comments on commit 822245e

Please sign in to comment.