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