diff --git a/apps/accounts/models/account.py b/apps/accounts/models/account.py index 14f4bd2cf..4a175609f 100644 --- a/apps/accounts/models/account.py +++ b/apps/accounts/models/account.py @@ -73,7 +73,11 @@ class Account(AbsConnectivity, LabeledMixin, BaseAccount): ] def __str__(self): - return '{}({})'.format(self.name, self.asset.name) + if self.asset_id: + host = self.asset.name + else: + host = 'Dynamic' + return '{}({})'.format(self.name, host) @lazyproperty def platform(self): diff --git a/apps/terminal/models/applet/applet.py b/apps/terminal/models/applet/applet.py index 05209b03d..fd5934285 100644 --- a/apps/terminal/models/applet/applet.py +++ b/apps/terminal/models/applet/applet.py @@ -301,7 +301,7 @@ class Applet(JMSBaseModel): 'account': account, 'lock_key': lock_key } - logger.debug('Select host and account: {}'.format(res)) + logger.debug('Select host and account: {}-{}'.format(host.name, account.username)) return res def delete(self, using=None, keep_parents=False):