views: set repo address limit to 128

Allow up to 128 IP addresses for repositories.
master v1.1.3-31
Alejandro Sirgo Rica 2024-09-10 12:20:29 +02:00
parent 6e1d266daf
commit fd4da7d3ed
1 changed files with 3 additions and 2 deletions

View File

@ -3093,9 +3093,10 @@ def repo_addr_is_valid(form):
res = False
flash(_(f'The following addresses are invalid: {" ".join(invalid_ips)}'), category='error')
if ip_count > 16:
MAX_IP_COUNT = 128
if ip_count > MAX_IP_COUNT:
res = False
flash(_('More than 16 addresses is not supported'), category='error')
flash(_(f'More than {MAX_IP_COUNT} addresses is not supported'), category='error')
return res