stackConsult commited on
Commit
ff2aaef
·
verified ·
1 Parent(s): 13b0088

Fix IndentationError line 50: Add missing consent_events_sample declaration and correct indentation

Browse files

ROOT CAUSE:
Line 50 had IndentationError because the dictionary literal { started with unexpected indentation without a proper variable assignment statement.

FIXES APPLIED:
1. Added consent_events_sample = [ on line 49 (column 0 - module level)
2. Corrected line 50 indentation to exactly 4 spaces (proper list item indentation)

This fix aligns with Python PEP 8 indentation standards and Gradio Blocks API requirements where data variables must be declared before the with gr.Blocks() context.

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -46,8 +46,8 @@ def audit_trail_widget(audit_history: List[Dict[str, Any]]):
46
  audit_log += f"{item.get('contact_id','?')},{item.get('event_type','?')},{item.get('opt_out',False)},{item.get('compliance_flag','?')}\n"
47
  return gr.Textbox(label="Audit Trail CSV", value=audit_log, lines=10)
48
 
49
-
50
- {
51
  "contact_id": "LEAD_001",
52
  "event_type": "consent_given",
53
  "timestamp": "2025-11-06T06:20:00Z",
 
46
  audit_log += f"{item.get('contact_id','?')},{item.get('event_type','?')},{item.get('opt_out',False)},{item.get('compliance_flag','?')}\n"
47
  return gr.Textbox(label="Audit Trail CSV", value=audit_log, lines=10)
48
 
49
+ consent_events_sample = [
50
+ {
51
  "contact_id": "LEAD_001",
52
  "event_type": "consent_given",
53
  "timestamp": "2025-11-06T06:20:00Z",