Skip to content

Fix interview response validation for expired interviews#114

Open
nishi240931 wants to merge 5 commits into
Team-NoxVeil:mainfrom
nishi240931:fix-interview-response-validation
Open

Fix interview response validation for expired interviews#114
nishi240931 wants to merge 5 commits into
Team-NoxVeil:mainfrom
nishi240931:fix-interview-response-validation

Conversation

@nishi240931
Copy link
Copy Markdown

Summary

Fixed the issue where CustomInterviewResponse inherited create-time validation from CustomInterviewCreate, causing validation errors when retrieving interviews whose dates had already passed.

Changes

  • Added CustomInterviewBase to hold shared interview fields
  • Kept future-date validation inside CustomInterviewCreate
  • Updated CustomInterviewResponse to inherit from CustomInterviewBase

Result

Organizations can now fetch interview details even after the interview start time, end time, or submission deadline has passed.

@RITVIKKAMASETTY
Copy link
Copy Markdown
Collaborator

RITVIKKAMASETTY commented May 20, 2026

@nishi240931 what's the error can you share the screenshot and explain this more clearly

@Karanjot786

This comment was marked as off-topic.

@nishi240931
Copy link
Copy Markdown
Author

nishi240931 commented Jun 1, 2026

@RITVIKKAMASETTY The issue was that CustomInterviewResponse previously inherited from CustomInterviewCreate.

CustomInterviewCreate contains the validate_times_and_scores() validator, which enforces that start_time, end_time, and submission_deadline must be in the future.

Because the response schema inherited from the create schema, the same validation was triggered when fetching existing interviews. As a result, once an interview started or its submission deadline passed, retrieving interview details could fail with errors such as start_time must be in the future.

To fix this, I introduced CustomInterviewBase for shared fields, kept the validation only in CustomInterviewCreate, and updated CustomInterviewResponse to inherit from the base schema instead.
Screenshot 2026-06-01 125959
Screenshot 2026-06-01 130400

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.

3 participants