Merge pull request #3127 from jumpserver/v52_manager

V52 manager
pull/3131/head
BaiJiangJie 2019-08-15 15:30:06 +08:00 committed by GitHub
commit 820dcaaae7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -71,9 +71,9 @@ class AssetUserManager:
if len(instances) == 1:
return instances[0]
elif len(instances) == 0:
self.raise_does_not_exist(self.__name__)
self.raise_does_not_exist(self.__class__.__name__)
else:
self.raise_multiple_return(self.__name__, len(instances))
self.raise_multiple_return(self.__class__.__name__, len(instances))
def raise_does_not_exist(self, name):
raise self.ObjectDoesNotExist(self.MSG_NOT_EXIST.format(name))