thunderbird / addons-server

🕶 addons.thunderbird.net Django app and API, forked from addons.mozilla.org 🎉
https://addons.thunderbird.net
BSD 3-Clause "New" or "Revised" License
18 stars 17 forks source link

Bugs/218 provide latest compatiable version hash for downloads #219

Closed MelissaAutumn closed 1 year ago

MelissaAutumn commented 1 year ago

Resolves #218

Adjusts latest_compatible_version to return the correct version and correct latest flag. Previous code only flipped latest to False if the current version was less than the min version. Which ignored situations where the app version could be above the version range.

The latest flag is only used in one spot, and that spot is for Download buttons. So chances of this change affecting a large part of ATN is minimal.

Reference: is_compatible_by_default returns True if file.binary_components or file.strict_compatibility is False on every file associated with that version.