Stripping error messages in services list
Fixed bug #1236276 Change-Id: I0612f1f3715faeee916c10354352e5577b153dbc
This commit is contained in:
parent
5e38d4ea52
commit
8238fb9487
|
@ -237,6 +237,9 @@ def get_environment_data(request, environment_id, *args):
|
|||
|
||||
|
||||
def services_list(request, environment_id):
|
||||
def strip(msg, to=100):
|
||||
return '%s...' % msg[:to] if len(msg) > to else msg
|
||||
|
||||
services = []
|
||||
# need to create new session to see services deployed be other user
|
||||
session_id = Session.get_or_create(request, environment_id)
|
||||
|
@ -255,7 +258,7 @@ def services_list(request, environment_id):
|
|||
service_data['type'])
|
||||
|
||||
if service_data['id'] in reports and reports[service_data['id']]:
|
||||
last_operation = str(reports[service_data['id']].text)
|
||||
last_operation = strip(str(reports[service_data['id']].text))
|
||||
time = reports[service_data['id']].updated.replace('T', ' ')
|
||||
else:
|
||||
last_operation = 'Service draft created' \
|
||||
|
|
Loading…
Reference in New Issue