Mar 05 2026: polish code
This commit is contained in:
@@ -477,7 +477,7 @@ def view(inspection_id):
|
|||||||
parent_form_data = parsed_p.get('_form_data', {})
|
parent_form_data = parsed_p.get('_form_data', {})
|
||||||
except (json.JSONDecodeError, TypeError):
|
except (json.JSONDecodeError, TypeError):
|
||||||
pass
|
pass
|
||||||
|
'''
|
||||||
# ── DEBUG: log raw schema + form_data so we can see what's actually stored ──
|
# ── DEBUG: log raw schema + form_data so we can see what's actually stored ──
|
||||||
current_app.logger.warning(
|
current_app.logger.warning(
|
||||||
'COMPARISON DEBUG | inspection_id=%s | current_form_data=%s',
|
'COMPARISON DEBUG | inspection_id=%s | current_form_data=%s',
|
||||||
@@ -496,7 +496,7 @@ def view(inspection_id):
|
|||||||
])
|
])
|
||||||
)
|
)
|
||||||
# ── END DEBUG ──
|
# ── END DEBUG ──
|
||||||
|
'''
|
||||||
scoreable_types = ('rating', 'checkbox', 'radio')
|
scoreable_types = ('rating', 'checkbox', 'radio')
|
||||||
|
|
||||||
# Collect all text/textarea fields per row, keyed by (col, fid)
|
# Collect all text/textarea fields per row, keyed by (col, fid)
|
||||||
@@ -620,7 +620,9 @@ def view(inspection_id):
|
|||||||
else:
|
else:
|
||||||
_seen[key] = len(merged_rows)
|
_seen[key] = len(merged_rows)
|
||||||
merged_rows.append(r)
|
merged_rows.append(r)
|
||||||
rows = merged_rows
|
# Drop any rows that are still unanswered on both sides after merging
|
||||||
|
rows = [r for r in merged_rows
|
||||||
|
if not (r['parent_pct'] is None and r['current_pct'] is None)]
|
||||||
|
|
||||||
comparison = {
|
comparison = {
|
||||||
'parent_id': parent.id,
|
'parent_id': parent.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user