Commit 39a7349f authored by Daniel W Bond's avatar Daniel W Bond
Browse files

removed integer casting for floor and room numbers

parent c48db0ca
...@@ -59,7 +59,7 @@ class DetailFloor(LoginRequiredMixin, DetailView): ...@@ -59,7 +59,7 @@ class DetailFloor(LoginRequiredMixin, DetailView):
url_parts = self.request.get_full_path().split('/') url_parts = self.request.get_full_path().split('/')
# [u'', u'housing', u'building', u'floor', ] # [u'', u'housing', u'building', u'floor', ]
building_name = url_parts[2].replace('-', ' ').title() building_name = url_parts[2].replace('-', ' ').title()
floor_number = int(url_parts[3]) floor_number = url_parts[3]
building = Building.objects.get(name=building_name) building = Building.objects.get(name=building_name)
floor = Floor.objects.get(number=floor_number, floor = Floor.objects.get(number=floor_number,
building=building) building=building)
...@@ -85,8 +85,8 @@ class DetailRoom(LoginRequiredMixin, DetailView): ...@@ -85,8 +85,8 @@ class DetailRoom(LoginRequiredMixin, DetailView):
url_parts = self.request.get_full_path().split('/') url_parts = self.request.get_full_path().split('/')
# [u'', u'housing', u'building', u'floor', u'room', ] # [u'', u'housing', u'building', u'floor', u'room', ]
building_name = url_parts[2].replace('-', ' ').title() building_name = url_parts[2].replace('-', ' ').title()
floor_number = int(url_parts[3]) floor_number = url_parts[3]
room_number = int(url_parts[4]) room_number = url_parts[4].upper()
building = Building.objects.get(name=building_name) building = Building.objects.get(name=building_name)
floor = Floor.objects.get(number=floor_number, floor = Floor.objects.get(number=floor_number,
building=building) building=building)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment