Fix recent data submitters in satellite page
The intent of the "5 recent submitters" on the satellite page is to show the 5 most recent stations and their last submitted time, whereas this was showing the last 5 submissions regardless of the ground station. Signed-off-by: Corey Shields <cshields@gmail.com>spacecruft
parent
95e89dc4b5
commit
c1d57a79cb
|
@ -167,7 +167,7 @@ def satellite(request, norad):
|
|||
try:
|
||||
# pull the last 5 observers and their submission timestamps for this satellite
|
||||
recent_observers = DemodData.objects.filter(satellite=satellite_obj) \
|
||||
.values('observer', 'timestamp').annotate(latest_payload=Max('timestamp')) \
|
||||
.values('observer').annotate(latest_payload=Max('timestamp')) \
|
||||
.order_by('-latest_payload')[:5]
|
||||
except (ObjectDoesNotExist, IndexError):
|
||||
recent_observers = ''
|
||||
|
|
|
@ -258,7 +258,7 @@
|
|||
{% for obs in recent_observers %}
|
||||
<tr>
|
||||
<td>{{obs.observer}}</td>
|
||||
<td>{{obs.timestamp|date:"Y-m-d H:i:s"}} UTC</td>
|
||||
<td>{{obs.latest_payload|date:"Y-m-d H:i:s"}} UTC</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in New Issue