Skip to content

Fix template syntax errors breaking operations check-in system - #7

Draft
kerryhatcher with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-6
Draft

Fix template syntax errors breaking operations check-in system#7
kerryhatcher with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-6

Conversation

Copilot AI commented Aug 4, 2025

Copy link
Copy Markdown

Fixed Django template syntax errors that were causing 500 Internal Server Errors when users attempted to access the operations check-in system at /operations/checkin/.

Problem

The operations check-in report template had multiple Django template tags concatenated on single lines without proper separation, causing the Django template parser to fail with:

TemplateSyntaxError: Could not parse the remainder: '"{%' from '"{%'

This was blocking critical emergency response functionality, preventing personnel from checking into incidents during emergencies.

Solution

Separated the concatenated template tags in operations/templates/operations/checkin/report.html:

Before (broken):

{% url 'operations:checkin_report' as report_url %}{% bootstrap_button button_type="link" content=incident.name button_class="btn-primary active" href=report_url|add:"?incident="|add:incident.id %}

After (fixed):

{% url 'operations:checkin_report' as report_url %}
{% bootstrap_button button_type="link" content=incident.name button_class="btn-primary active" href=report_url|add:"?incident="|add:incident.id %}

Impact

  • Emergency response personnel can now access the check-in system
  • Incident filter buttons work correctly
  • Resolves 500 errors when accessing /operations/checkin/
  • Restores critical disaster response functionality

Testing

  • Validated template syntax with comprehensive tests
  • Confirmed no other templates have similar concatenation issues
  • Verified the specific error pattern is resolved

Fixes #6.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • astral.sh
    • Triggering command: curl -LsSf REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: kerryhatcher <1011814+kerryhatcher@users.noreply.github.com>
@sonarqubecloud

sonarqubecloud Bot commented Aug 4, 2025

Copy link
Copy Markdown

Copilot AI changed the title [WIP] Template Syntax Errors Breaking Operations Check-in System Fix template syntax errors breaking operations check-in system Aug 4, 2025
Copilot AI requested a review from kerryhatcher August 4, 2025 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Template Syntax Errors Breaking Operations Check-in System

2 participants