Skip to content
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

add warnings when datetime-related filters called with null arguments #1064

Conversation

boulter
Copy link
Contributor

@boulter boulter commented May 1, 2023

In the future we may change this behavior so null args do not default to the current time. I suspect many users didn't know this was happening since there was no warning.

@boulter boulter requested review from tkindy and jasmith-hs May 1, 2023 19:45
import org.junit.Test;

public class BetweenTimesFilterTest extends BaseJinjavaTest {

@Before
public void setup() {
jinjava.getGlobalContext().registerClasses(EscapeJsFilter.class);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like this was copied from some other test

Copy link
Contributor

@jasmith-hs jasmith-hs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to add a test that the warning gets added?

@boulter
Copy link
Contributor Author

boulter commented May 1, 2023

Want to add a test that the warning gets added?

Oh weird, I had one. Where did it go?

@boulter
Copy link
Contributor Author

boulter commented May 1, 2023

@jasmith-hs
Copy link
Contributor

@boulter boulter merged commit 055f189 into master May 1, 2023
@boulter boulter deleted the jboulter-add-warnings-when-datetimefilters-called-with-null-arguments branch May 1, 2023 21:12
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