fix bug 823; fix bug 800
Change-Id: Idafe6cd3ab8db26cb763be9f334809429dbec913
Signed-off-by: lombardofr <lombardo@everyup.it>
diff --git a/projecthandler/template/project/osm/osm_project_left_sidebar.html b/projecthandler/template/project/osm/osm_project_left_sidebar.html
index 7259834..a16d86e 100644
--- a/projecthandler/template/project/osm/osm_project_left_sidebar.html
+++ b/projecthandler/template/project/osm/osm_project_left_sidebar.html
@@ -1,3 +1,18 @@
+<!--
+Copyright 2019 EveryUP srl
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
@@ -119,14 +134,12 @@
<i class="fas fa-users"></i> <span>Users</span>
</a>
</li>
- {%comment%}
{% url "roles:list" as role_list_url %}
<li {% if request.get_full_path == role_list_url %} class="active" {% endif %}>
<a href='{% url "roles:list" %}'>
<i class="fas fa-user-tag"></i> <span>Roles</span>
</a>
</li>
- {%endcomment%}
{% endif %}
</ul>
diff --git a/projecthandler/views.py b/projecthandler/views.py
index 8d4ac83..f36c7ab 100644
--- a/projecthandler/views.py
+++ b/projecthandler/views.py
@@ -75,11 +75,13 @@
vnfd = client.vnfd_list(user.get_token())
ns = client.ns_list(user.get_token())
vnf = client.vnf_list(user.get_token())
+
+ proj_data_admin = prj['data']['_admin'] if prj and prj['data'] and prj['data']['_admin'] and prj['error'] is False else None
project_overview = {
'owner': user.username,
'name': user.project_name,
- 'updated_date': prj['data']['_admin']['modified'] if prj and prj['error'] is False else '-',
- 'created_date': prj['data']['_admin']['created'] if prj and prj['error'] is False else '-',
+ 'updated_date': proj_data_admin['modified'] if proj_data_admin else '-',
+ 'created_date': proj_data_admin['created'] if proj_data_admin else '-',
'type': 'osm',
'nsd': len(nsd['data']) if nsd and nsd['error'] is False else 0,