Better response variable name db_changed -> report_success
authorKarl O. Pinc <kop@karlpinc.com>
Tue, 16 Jul 2024 12:55:29 +0000 (07:55 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Tue, 16 Jul 2024 12:55:29 +0000 (07:55 -0500)
src/pgwui_bulk_upload/views/bulk_upload.py
tests/views/test_bulk_upload.py

index 9dd250a2023ffed621747d9334ce05208aad4ffa..929cbdb4781af68e9b4658e07cf76521cf26116a 100644 (file)
@@ -714,7 +714,7 @@ def analyze_results(uh, response):
     r_stats = relation_stats(stats, uh.quote_columns())
     response['relation_stats'] = r_stats
 
-    if response['db_changed']:
+    if response['report_success']:
         log_success(response, stats, i_rows, r_stats)
 
     return response
index 7646dae8d4aff4c25a0b3f1c144df379f05f31db..4f5246bb534504f11f35278c64dc5e9f42fbac13 100644 (file)
@@ -38,7 +38,7 @@ pytest_plugins = ("pgwui",)
 # Constants
 CHANGED_RESPONSE = {
     'db': 'somedb',
-    'db_changed': True,
+    'report_success': True,
     'filename': 'file',
     'lines': 5,
     'null_rep': 'NULL',
@@ -48,7 +48,7 @@ CHANGED_RESPONSE = {
     'user': 'someuser',
 }
 
-UNCHANGED_RESPONSE = {'db_changed': False}
+UNCHANGED_RESPONSE = {'report_success': False}
 
 HOME_PAGE_SETTINGS = {'type': 'URL',
                       'source': '/'}