You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2018/12/19 00:13:27 UTC
[incubator-superset] branch master updated: [cosmetic] add css
no-wrap on CRUD's last modified (#6522)
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 5a1ff0f [cosmetic] add css no-wrap on CRUD's last modified (#6522)
5a1ff0f is described below
commit 5a1ff0f09d418d5c6ff7f4cf2cdd9863102df962
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Tue Dec 18 16:13:21 2018 -0800
[cosmetic] add css no-wrap on CRUD's last modified (#6522)
---
superset/models/helpers.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/superset/models/helpers.py b/superset/models/helpers.py
index f1cb1cd..ec2ac82 100644
--- a/superset/models/helpers.py
+++ b/superset/models/helpers.py
@@ -270,12 +270,12 @@ class AuditMixinNullable(AuditMixin):
@renders('changed_on')
def changed_on_(self):
- return Markup(
- '<span class="no-wrap">{}</span>'.format(self.changed_on))
+ return Markup(f'<span class="no-wrap">{self.changed_on}</span>')
@renders('changed_on')
def modified(self):
- return humanize.naturaltime(datetime.now() - self.changed_on)
+ time_str = humanize.naturaltime(datetime.now() - self.changed_on)
+ return Markup(f'<span class="no-wrap">{time_str}</span>')
class QueryResult(object):