refactor auto import
This commit is contained in:
@@ -52,6 +52,7 @@ def import_regulation_section_update_ref_state(cursor):
|
||||
|
||||
'''
|
||||
cursor.execute(query)
|
||||
text_normal = TextNormalizer()
|
||||
|
||||
|
||||
url = BASE_URL + "repo/majles/rgsection/multi/update"
|
||||
@@ -127,16 +128,15 @@ def import_regulation_section_update_ref_state(cursor):
|
||||
ref_state = {
|
||||
"id" : row.id,
|
||||
"qanon_id": efect_qanon_id,
|
||||
"qanon_title" : normalYehKe(row.effect_qanon),
|
||||
"qanon_title" : text_normal.normalize_qanon(row.effect_qanon),
|
||||
"qanon_date": row.effect_Date,
|
||||
"section_id": efect_section_id,
|
||||
"section_title": normalYehKe(row.effect_section_title),
|
||||
"ref_key": "qavanin",
|
||||
"effect_type" : effect_type,
|
||||
"new_text" : normalYehKe(row.effect_text),
|
||||
"prev_text" : normalYehKe(row.effect_prev_text),
|
||||
"description" : normalYehKe(row.description)
|
||||
}
|
||||
"new_text" : text_normal.normalize_qanon(row.effect_text),
|
||||
"prev_text" : text_normal.normalize_qanon(row.effect_prev_text),
|
||||
"description" : text_normal.normalize_qanon(row.description) }
|
||||
|
||||
|
||||
if previd == eid :
|
||||
|
||||
Reference in New Issue
Block a user