-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle errors while parsing dates in filters
There were error, handling the returned value of the date string parser. Problem was that the parser could return None value which was compared against other None or date which obviously does not compute. Solution to this is to fail early on the parser function and handle the error correctly where the parser function is used. This lead to writing error handling to the MaybeRelativeDateField since the viewset using the function was correctly handling errors (just not the None values). Before this, when giving badly formatted date parameter in the dateperiod end would have been okay and all the periods would be returned - not anymore, now it returns a validation error. Refs HAUKI-564
- Loading branch information
Showing
4 changed files
with
45 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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