Skip to content

Commit

Permalink
Update models.py
Browse files Browse the repository at this point in the history
  • Loading branch information
alesanchezr authored Dec 2, 2024
1 parent 2f3bfac commit 47bac48
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion breathecode/registry/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,11 @@ def compare_versions(version1, version2):

return 0

original_version = branch_name
pattern = r"^v\d+\.\d+$"
if not bool(re.match(branch_name, string)):
raise ValueError("Version name must follow the format vX.X, for example: v1.0")

original_version = branch_name.replace("v", "")
original_major_version = int(original_version.split(".")[0])

assets = Asset.objects.filter(readme_url__icontains=f"github.com/{org_name}/{repo_name}/blob/")
Expand Down

0 comments on commit 47bac48

Please sign in to comment.