mirror of https://github.com/jumpserver/jumpserver
fix: 修复终端更新存储失败的问题
parent
4fd7f0e949
commit
8ae6863266
|
@ -176,12 +176,6 @@ class Terminal(StorageMixin, TerminalStatusMixin, models.Model):
|
|||
self.save()
|
||||
return
|
||||
|
||||
def save(self, **kwargs):
|
||||
from .storage import CommandStorage, ReplayStorage
|
||||
self.command_storage = CommandStorage.default().name
|
||||
self.replay_storage = ReplayStorage.default().name
|
||||
return super().save(**kwargs)
|
||||
|
||||
def __str__(self):
|
||||
status = "Active"
|
||||
if not self.is_accepted:
|
||||
|
|
|
@ -119,5 +119,7 @@ class TerminalRegistrationSerializer(serializers.ModelSerializer):
|
|||
instance.remote_addr = get_request_ip(request)
|
||||
sa = self.service_account.save()
|
||||
instance.user = sa
|
||||
instance.command_storage = CommandStorage.default().name
|
||||
instance.replay_storage = ReplayStorage.default().name
|
||||
instance.save()
|
||||
return instance
|
||||
|
|
Loading…
Reference in New Issue