Esempio n. 1
0
 def __init__(self, request, dates):
     try:
         self.location = Location.objects.get(
             pk=int(request.POST['drill_key']))
     except:
         self.location = Location.tree.root_nodes()[0]
     Report.__init__(self, request, dates)
Esempio n. 2
0
 def __init__(self, request, dates):
     try:
         self.location = get_location_for_user(request.user)
     except:
         pass
     if self.location is None:
         self.location = Location.tree.root_nodes()[0]
     Report.__init__(self, request, dates)
Esempio n. 3
0
 def __init__(self, request, dates):
     try:
         self.location = Location.objects.get(pk=int(request.POST['drill_key']))
     except:
         self.location = Location.tree.root_nodes()[0]
     Report.__init__(self, request, dates)