fix exception when no posts are in database
Instead of using Query.one use Query.one_or_none. The check after setting the variable suggests this was the intended behaviour instead of throwing errors if there are no posts in the database.
This commit is contained in:
parent
159c1826d3
commit
b54a26cf8f
Loading…
Reference in New Issue