Skip to content

Commit

Permalink
Update of era fails
Browse files Browse the repository at this point in the history
  • Loading branch information
tlocke committed Sep 7, 2023
1 parent 99a3613 commit 2874f0d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions chellow/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4136,13 +4136,15 @@ def _settle_stripe(sess, start_date, finish_date, old_era, new_era):
c_params["finish_date"] = finish_date

sess.execute(
"update hh_datum set channel_id = :target_channel_id "
"where start_date >= :start_date and "
"channel_id = :channel_id"
+ (
""
if finish_date is None
else " and start_date <= :finish_date"
text(
"update hh_datum set channel_id = :target_channel_id "
"where start_date >= :start_date and "
"channel_id = :channel_id"
+ (
""
if finish_date is None
else " and start_date <= :finish_date"
)
),
c_params,
)
Expand Down

0 comments on commit 2874f0d

Please sign in to comment.