remove restriction when using open api

This commit is contained in:
zema1 committed 2018-12-16 10:36:43 +08:00
1 parent 745dba8cad
commit 03c68419b0
5 files changed
+9 -5

No files matched your search

+1 -1
View File
@@ -57,7 +57,7 @@ class ContestAPI(APIView):
for ip_range in data["allowed_ip_ranges"]:
try:
ip_network(ip_range, strict=False)
except ValueError as e:
except ValueError:
return self.error(f"{ip_range} is not a valid cidr network")
if not contest.real_time_rank and data.get("real_time_rank"):
cache_key = f"{CacheKey.contest_rank_cache}:{contest.id}"