add dev check to version

This commit is contained in:
wh1te909 2022-06-25 09:02:23 +00:00
parent f63e801608
commit 0a9d29c98d
1 changed files with 4 additions and 1 deletions

View File

@ -506,7 +506,10 @@ class Installer(APIView):
return notify_error("Invalid data") return notify_error("Invalid data")
ver = request.data["version"] ver = request.data["version"]
if pyver.parse(ver) < pyver.parse(settings.LATEST_AGENT_VER): if (
pyver.parse(ver) < pyver.parse(settings.LATEST_AGENT_VER)
and not "-dev" in settings.LATEST_AGENT_VER
):
return notify_error( return notify_error(
f"Old installer detected (version {ver} ). Latest version is {settings.LATEST_AGENT_VER} Please generate a new installer from the RMM" f"Old installer detected (version {ver} ). Latest version is {settings.LATEST_AGENT_VER} Please generate a new installer from the RMM"
) )