{% import 'macro/accordion.html' as accordion %} {{ accordion.header('Database Integrity Check', 'database-integrity', 'admin', expanded=true, icon='shield-check-line') }} {% if database_error %} {% endif %}
Scan Results
{% if total_issues == 0 %}
Back to admin
{% else %}
Summary
{% for issue in integrity_issues %} {% endfor %}
Issue Type Count Description
{{ issue.issue_type }} {{ issue.count }} {{ issue.description }}
{% if orphaned_sets|length > 0 %}
Orphaned Sets ({{ orphaned_sets|length }})

These sets exist in bricktracker_sets but are missing from rebrickable_sets:

{% for set in orphaned_sets %} {% endfor %}
Set Number ID Storage Purchase Price
{{ set.set }} {{ set.id }} {{ set.storage or '-' }} {{ set.purchase_price or '-' }}
{% endif %} {% if orphaned_parts|length > 0 %}
Orphaned Parts ({{ orphaned_parts|length }})

These parts exist in bricktracker_parts but are missing from rebrickable_parts:

{% for part in orphaned_parts[:20] %} {% endfor %} {% if orphaned_parts|length > 20 %} {% endif %}
Part Color Set Number Quantity Spare
{{ part.part }} {{ part.color }} {{ part.set_number or '-' }} {{ part.quantity }} {{ 'Yes' if part.spare else 'No' }}
... and {{ orphaned_parts|length - 20 }} more
{% endif %} {% if parts_missing_set|length > 0 %}
Parts with Missing Set References ({{ parts_missing_set|length }})

These parts reference sets that don't exist in bricktracker_sets:

{% for part in parts_missing_set[:20] %} {% endfor %} {% if parts_missing_set|length > 20 %} {% endif %}
Part Color Set ID Quantity
{{ part.part }} {{ part.color }} {{ part.id }} {{ part.quantity }}
... and {{ parts_missing_set|length - 20 }} more
{% endif %}
Back to admin
{% endif %} {{ accordion.footer() }}