{{ message }}
Fix inject template import errors and null team crashes#1114
Merged
Conversation
- Import with existing IDs now creates new templates instead of erroring when the template ID doesn't exist in the database - Skip team names that don't match any team in the DB during import instead of creating orphaned Inject rows with null team_id - Guard against null inject.team in GET template and scores endpoints - Fix end_time parsing bug that incorrectly used start_time value Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
14 tests covering: - Auth/authorization (requires login, white team only) - Creating new templates with and without team injects - Import with non-existent ID falls through to create (was the bug) - Unknown team names are silently skipped (no orphaned injects) - Updating existing templates by ID - GET template endpoint handles null-team injects without crashing - Scores endpoint handles null-team injects without crashing - end_time parsed from correct field (not start_time) - Empty data returns proper error Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
idfields, the import would fail with "Invalid Template ID" if those IDs didn't exist in the database. Now falls through to create new templates instead of erroring.Injectrows withteam_id=NULL. Now skips unrecognized team names.AttributeError: 'NoneType' object has no attribute 'name'when encountering injects with null teams. Added guards.d["start_time"]forend_time. Fixed to used["end_time"].Test plan
idfields into a fresh database — should create new templates🤖 Generated with Claude Code