Fix #1558: Add date validation constraints for challenge phases#4982
Open
jaideepj2004 wants to merge 2 commits into
Open
Fix #1558: Add date validation constraints for challenge phases#4982jaideepj2004 wants to merge 2 commits into
jaideepj2004 wants to merge 2 commits into
Conversation
… errors from FAQ - Removed outdated pip/virtualenv installation instructions - Removed bower, gulp, npm, and sass installation errors - Removed Python 2.7 specific errors - Removed proxy/network configuration for npm - Removed karma and mocha errors - Kept only Docker-related errors relevant to current setup - Updated setup recommendation to use Docker-based environment All removed sections are incompatible with the current Docker-based workflow.
- Add validation to ensure phase start/end dates are within challenge dates - Validate that phase start date is before phase end date - Validate that challenge start date is before challenge end date - Add comprehensive unit tests covering all validation scenarios - Tests include edge cases and valid date configurations
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.
Description
Fixes #1558
This PR adds comprehensive date validation constraints for challenge phases to ensure logical consistency between challenge and phase dates.
Changes Made
Added validation in
ChallengePhase.save()method to enforce 6 date constraints:Added comprehensive unit tests in
ChallengePhaseDateValidationTestCasecovering:Testing
References