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

Fix issue with {% if model.related %} where related is None. Fixes #1059 #1070

Closed
wants to merge 1 commit into from

Conversation

voidus
Copy link
Contributor

@voidus voidus commented Jul 13, 2023

I couldn't get the tests to run on my machine with either the makefile, pytest directly or tox, so I'm trusting the github actions.

@voidus
Copy link
Contributor Author

voidus commented Jul 16, 2023

Ok got it this works PYTHONPATH=$PWD DJANGO_SETTINGS_MODULE=pytest_django_test.settings_sqlite_file ./build/venv/bin/python -m pytest

@voidus
Copy link
Contributor Author

voidus commented Jul 17, 2023

Ok this is complete nonsense because RelatedManagers are truthy, and thus bool(model.related) is always True. I was looking for model.related.exists().

Running the tests is still janky though. But sorry for the noise.

@voidus voidus closed this Jul 17, 2023
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.

None yet

1 participant