1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-01-31 01:48:04 +03:00

Set 0 as unliminet for masServices field

This commit is contained in:
Adolfo Gómez García 2023-12-04 18:49:42 +01:00
parent cf245e47be
commit 2f272da073
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23

View File

@ -288,6 +288,9 @@ class Service(Module):
self.maxUserServices = maxServices
elif isinstance(maxServices, gui.NumericField):
self.maxUserServices = maxServices.num()
# For 0 values on maxUserServices field, we will set it to UNLIMITED
if self.maxUserServices == 0:
self.maxUserServices = consts.UNLIMITED
elif callable(maxServices):
self.maxUserServices = maxServices()
else: