Skip to content

Commit

Permalink
Fix broken backup for dev version
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurswag committed Oct 10, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent a3beb23 commit f8701b0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions backend/serdes/views.py
Original file line number Diff line number Diff line change
@@ -103,6 +103,7 @@ def post(self, request, *args, **kwargs):
return Response({}, status=status.HTTP_403_FORBIDDEN)
if not request.data:
logger.error("Request has no data")

return Response(
{"error": "backupLoadNoData"}, status=status.HTTP_400_BAD_REQUEST
)
@@ -129,6 +130,9 @@ def post(self, request, *args, **kwargs):
status=status.HTTP_400_BAD_REQUEST,
)

if backup_version.lower() == "dev":
backup_version = "v0.0.0"

VERSION_REGEX = r"^v[0-9]+\.[0-9]+\.[0-9]+"
match = re.match(VERSION_REGEX, backup_version)
if match is None:
@@ -145,8 +149,6 @@ def post(self, request, *args, **kwargs):
backup_version = match.group()
current_version = VERSION.split("-")[0]

if backup_version.lower() == "dev":
backup_version = "v0.0.0"
if current_version.lower() == "dev":
current_version = "v0.0.0"

0 comments on commit f8701b0

Please sign in to comment.