summaryrefslogtreecommitdiff
path: root/slot/views.py
diff options
context:
space:
mode:
authordk-152017-05-26 03:06:14 +0530
committerdk-152017-05-26 03:09:12 +0530
commit909763c658b4fff1f7a1697669aa381197f3daee (patch)
tree2b7805b3815c2ee07f286900bf58663f81129603 /slot/views.py
parentaf581060fcb22ea5aa664e11f942e3fb108ed182 (diff)
downloadSBHS-2018-Rpi-909763c658b4fff1f7a1697669aa381197f3daee.tar.gz
SBHS-2018-Rpi-909763c658b4fff1f7a1697669aa381197f3daee.tar.bz2
SBHS-2018-Rpi-909763c658b4fff1f7a1697669aa381197f3daee.zip
Add features and fix bugs
- Fix sorting bug in bookings - Prevent admin access during ongoing experiment - Fix trashable bug in slot deletion - Show only online machines in test boards
Diffstat (limited to 'slot/views.py')
-rw-r--r--slot/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/slot/views.py b/slot/views.py
index b137f93..5d22ac2 100644
--- a/slot/views.py
+++ b/slot/views.py
@@ -54,7 +54,7 @@ def create(req):
@login_required(redirect_field_name=None)
def index(req):
- bookings = req.user.booking_set.select_related("slot").order_by("booking_date")
+ bookings = req.user.booking_set.select_related("slot").filter(trashed_at__isnull=True).order_by("booking_date")
return render(req, "slot/index.html", {"bookings": reversed(bookings),
"now_time": datetime.datetime.now()})