From 1c6a649a934871c398d9e7b57a927f7b4fa02a22 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Valenta?= <git@imaniti.org>
Date: Sun, 16 Apr 2023 15:37:12 +0200
Subject: [PATCH] update for valid non-subdomains

---
 contracts/models.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contracts/models.py b/contracts/models.py
index 9e431ba..32bfbb8 100644
--- a/contracts/models.py
+++ b/contracts/models.py
@@ -20,7 +20,7 @@ from users.models import User
 class SubdomainValidatedURLField(models.URLField):
     validators = [
         URLValidator(schemes=("https",)),
-        RegexValidator(regex=r"https:\/\/.*\.pirati.cz(\/|$).*"),
+        RegexValidator(regex=r"https:\/\/(.*\.|)pirati.cz(\/|$).*"),
     ]
 
 
-- 
GitLab