perf: 修改 migrations 依赖

This commit is contained in:
ibuler
2022-12-05 12:58:09 +08:00
parent 0047af4584
commit ca228074e3
2 changed files with 32 additions and 22 deletions

View File

@@ -86,12 +86,6 @@ class ConnectionToken(OrgModelMixin, JMSBaseModel):
def expire_at(self):
return self.permed_account.date_expired.timestamp()
@lazyproperty
def connect_method_object(self):
from terminal.const import TerminalType
method = TerminalType.get_connect_method(self.connect_method, protocol=self.protocol)
return method
def is_valid(self):
if self.is_expired:
error = _('Connection token expired at: {}').format(as_current_tz(self.date_expired))