Skip to content

Commit

Permalink
update mapping for chair review required and draft and was released f…
Browse files Browse the repository at this point in the history
…lags (#1330)
  • Loading branch information
mhuseinov authored Jan 25, 2024
1 parent dd448a2 commit 6ea0c48
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def _get_insert_query():
%(created_at)s,
%(date)s,
%(decision_description)s,
false,
true,
false,
%(outcome_code)s,
%(rescinded_comment)s,
Expand All @@ -133,6 +133,9 @@ def _get_insert_query():
rescinded_comment = COALESCE(EXCLUDED.rescinded_comment, alcs.application_decision.rescinded_comment),
rescinded_date = COALESCE(EXCLUDED.rescinded_date, alcs.application_decision.rescinded_date),
is_subject_to_conditions = COALESCE(EXCLUDED.is_subject_to_conditions, alcs.application_decision.is_subject_to_conditions),
was_released = True,
is_draft = False,
chair_review_required = COALESCE(EXCLUDED.chair_review_required, true),
oats_alr_appl_decision_id = EXCLUDED.oats_alr_appl_decision_id;
"""
return query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
OATS_ETL_USER,
setup_and_get_logger,
add_timezone_and_keep_date_part,
BATCH_UPLOAD_SIZE
BATCH_UPLOAD_SIZE,
)
from db import inject_conn_pool
from psycopg2.extras import RealDictCursor, execute_batch
Expand Down Expand Up @@ -133,6 +133,8 @@ def _get_insert_query():
rescinded_comment = COALESCE(EXCLUDED.rescinded_comment, alcs.notice_of_intent_decision.rescinded_comment),
rescinded_date = COALESCE(EXCLUDED.rescinded_date, alcs.notice_of_intent_decision.rescinded_date),
is_subject_to_conditions = COALESCE(EXCLUDED.is_subject_to_conditions, alcs.notice_of_intent_decision.is_subject_to_conditions),
was_released = True,
is_draft = False,
oats_alr_appl_decision_id = EXCLUDED.oats_alr_appl_decision_id;
"""
return query
Expand Down

0 comments on commit 6ea0c48

Please sign in to comment.