Validate number of days in account log search form #3289
Merged
johannaengland merged 1 commit intoUninett:masterfrom Mar 6, 2025
Merged
Validate number of days in account log search form #3289johannaengland merged 1 commit intoUninett:masterfrom
johannaengland merged 1 commit intoUninett:masterfrom
Conversation
hmpf
reviewed
Feb 25, 2025
Contributor
hmpf
left a comment
There was a problem hiding this comment.
I approved the sub-PR of this one, but: this could be DRYed. Three of the same thing, no?
def validate_datetime_for_overflow(timeobj, td: timedelta):
try:
datetime.now() - td
except OverflowError:
raise forms.ValidationError("They did not have computers %s days ago" % timeobj)
Contributor
Author
Very good idea! |
1dc5ad8 to
9640b46
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3289 +/- ##
==========================================
- Coverage 60.78% 60.77% -0.01%
==========================================
Files 606 606
Lines 43762 43767 +5
Branches 48 48
==========================================
+ Hits 26599 26600 +1
- Misses 17151 17155 +4
Partials 12 12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9640b46 to
ffd84ab
Compare
lunkwill42
approved these changes
Mar 5, 2025
ffd84ab to
7e0a6b0
Compare
|
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.



Closes #3247. Dependent on #3295.