diff --git a/webroot/AutoSa/AutoSa/views.py b/webroot/AutoSa/AutoSa/views.py index 969e90dd0..80c8925dc 100644 --- a/webroot/AutoSa/AutoSa/views.py +++ b/webroot/AutoSa/AutoSa/views.py @@ -842,7 +842,7 @@ def showPerm(request): user = User.objects.get(username=username) for asset_id in assets_del: - asset = Assets.objects.get(id=asset_id) + asset = Assets.objects.get(id=int(asset_id)) asset_user_del = AssetsUser.objects.get(uid=user, aid=asset) asset_user_del.delete() return HttpResponseRedirect('/showPerm/?username=%s' % username) @@ -1080,7 +1080,7 @@ def downFile(request): def logView(request): thirtyDayAgo = (datetime.datetime.now() - datetime.timedelta(30)) thirtyDayAgoStamp = int(time.mktime(thirtyDayAgo.timetuple())) - logs_all = Logs.objects.filter(start_time__gt=thirtyDayAgoStamp) + logs_all = Logs.objects.filter(start_time__gt=thirtyDayAgoStamp).order_by("-id") paginator = Paginator(logs_all, 20) try: diff --git a/webroot/AutoSa/templates/addAssets.html b/webroot/AutoSa/templates/addAssets.html index 65c440b1c..be1100757 100644 --- a/webroot/AutoSa/templates/addAssets.html +++ b/webroot/AutoSa/templates/addAssets.html @@ -28,9 +28,9 @@
- {% for idc in idcs %} - + {% endfor %}
diff --git a/webroot/AutoSa/templates/addPerm.html b/webroot/AutoSa/templates/addPerm.html index 2c28bd213..ff505b54a 100644 --- a/webroot/AutoSa/templates/addPerm.html +++ b/webroot/AutoSa/templates/addPerm.html @@ -26,7 +26,7 @@ {% endfor %} - + {% endblock %} %} \ No newline at end of file