-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for unexpected zero value last edit dates in segment archiving #21189
Conversation
While you are in this private method, I have some suggestions of small improvements, let me know what you think.
|
Done.
Not really, the method is called
Unless we're going to try to enforce a 'method can only do one thing' rule and subsequently undertake long term refactoring of all existing code to this standard then I don't see any meaningful benefit in breaking this particular 13 line method into two slightly smaller methods.
The style preferences highlighted here could also apply to most of the codebase so I think it would be more efficient and constructive to address them via general project wide coding conventions. |
Co-authored-by: Stefan Giehl <[email protected]>
Description:
If a segment has a last edited date of
0000-00-00
then segment archiving will fail with the exception:The date ... is a date before first website was online.
This is caused by attempting to parse the invalid
0000-00-00
date string. This PR adds a simple check to avoid parsing if the last edited date is null or zero along with some additional tests to check an exception isn't thrown when zero dates are provided.ref: L3-522
Review