danirus / django-comments-xtd

A pluggable Django comments application with thread support, follow-up notifications, mail confirmation, like/dislike flags, moderation, a ReactJS plugin and Bootstrap 5.3.
https://django-comments-xtd.readthedocs.io
BSD 2-Clause "Simplified" License
594 stars 158 forks source link

Issue 221 #223

Closed mckinly closed 3 years ago

mckinly commented 3 years ago

Problem

Issue with patch versions as noted in Issue 221 filed by @gassan It appears this line was never getting hit, because 0 is falsy in python (see here).

Solution

Instead of evaluating if VERSION[2]: I updated it to if VERSION[2] is not None

Testing

I added 2 unit tests to ensure a 0 patch version and anything greater than 0 is handled.

mckinly commented 3 years ago

@gassan @danirus Here's my PR. I'm happy to receive any feedback and make any suggested changes!