1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-25 23:21:41 +03:00

fixed refactored var

This commit is contained in:
Adolfo Gómez García 2020-05-22 13:15:40 +02:00
parent e0a512eefb
commit 6ff997b054

View File

@ -236,7 +236,7 @@ class ServicePool(UUIDModel, TaggingMixin): # type: ignore
# Return the date
try:
if activePub and activePub.id != self.assignedUserServices().filter(user=forUser, state__in=states.servicePool.VALID_STATES)[0].publication.id:
if activePub and activePub.id != self.assignedUserServices().filter(user=forUser, state__in=states.userService.VALID_STATES)[0].publication.id:
ret = self.recoverValue('toBeReplacedIn')
if ret:
return pickle.loads(ret)
@ -571,7 +571,7 @@ class ServicePool(UUIDModel, TaggingMixin): # type: ignore
return 0
if cachedValue == -1:
cachedValue = self.assignedUserServices().filter(state__in=states.servicePool.VALID_STATES).count()
cachedValue = self.assignedUserServices().filter(state__in=states.userService.VALID_STATES).count()
return 100 * cachedValue // maxs