Fixed fleet identifier for download of last position
authorJean-Michel Nirgal Vourgère <jmv@nirgal.com>
Sun, 7 Nov 2010 15:06:02 +0000 (15:06 +0000)
committerJean-Michel Nirgal Vourgère <jmv@nirgal.com>
Sun, 7 Nov 2010 15:06:02 +0000 (15:06 +0000)
bin/djais/views.py

index 80aa9e4751516c8e7a5994e8e778e27ad68afa60..0e37e408da8bfe4c38c6c664e77ffde486d75138 100644 (file)
@@ -596,7 +596,7 @@ def fleet_lastpos(request, fleetname):
     fleet = get_object_or_404(Fleet, name=fleetname)
     if not FleetUser.objects.filter(fleet=fleet.id, user=request.user.id).all():
         return HttpResponseForbidden('<h1>Forbidden</h1>')
-    fleet_uset = load_fleet_to_uset(fleetname)
+    fleet_uset = load_fleet_to_uset(fleet.id)
     # = set([mmsi_to_strmmsi(vessel.mmsi) for vessel in fleet.vessel.all()])
     value = kml_to_kmz(format_fleet(fleet_uset, document_name=fleetname+' fleet').encode('utf-8'))
     response = HttpResponse(value, mimetype="application/vnd.google-earth.kml")