mirror of https://github.com/jumpserver/jumpserver
Merge pull request #9871 from jumpserver/pr@dev@fix_su_from_accounts
fix: 修复su-from-accounts API 500问题,Unsubscribe msg error 转成debugpull/9883/head
commit
21352a2ab7
|
@ -43,7 +43,7 @@ class AccountViewSet(OrgBulkModelViewSet):
|
|||
asset = get_object_or_404(Asset, pk=asset_id)
|
||||
accounts = asset.accounts.all()
|
||||
else:
|
||||
accounts = []
|
||||
accounts = Account.objects.none()
|
||||
accounts = self.filter_queryset(accounts)
|
||||
serializer = serializers.AccountSerializer(accounts, many=True)
|
||||
return Response(data=serializer.data)
|
||||
|
|
|
@ -108,7 +108,7 @@ class Subscription:
|
|||
try:
|
||||
self.sub.close()
|
||||
except Exception as e:
|
||||
logger.error('Unsubscribe msg error: {}'.format(e))
|
||||
logger.debug('Unsubscribe msg error: {}'.format(e))
|
||||
|
||||
def retry(self, _next, error, complete):
|
||||
logger.info('Retry subscribe channel: {}'.format(self.ch))
|
||||
|
|
Loading…
Reference in New Issue