Permalink
Browse files

Corrected period for probe 'text' (need to better check date interval).

  • Loading branch information...
1 parent 71cb057 commit 1f68f7310cba315fcd1ae5ed5059892bae58441c @rsaikali committed Sep 10, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 skwissh/views.py
View
@@ -66,7 +66,7 @@ def mesures(request, server_id, probe_id, period):
probe = get_object_or_404(Probe, pk=probe_id)
server = get_object_or_404(Server, pk=server_id)
now = datetime.datetime.utcnow().replace(tzinfo=utc)
- if period == 'last':
+ if period == 'last' or probe.graph_type.name == "text":
data = Measure.objects.filter(server=server, probe=probe)[0:1]
elif period == 'hour':
data = Measure.objects.filter(server=server, probe=probe, timestamp__gte=now - datetime.timedelta(hours=1))

0 comments on commit 1f68f73

Please sign in to comment.