После рефакторинга
This commit is contained in:
@@ -167,7 +167,7 @@ class ShowSourcesMapView(LoginRequiredMixin, View):
|
||||
}
|
||||
)
|
||||
else:
|
||||
return redirect("mainapp:home")
|
||||
return redirect("mainapp:source_list")
|
||||
|
||||
# Get polygon filter from URL if present
|
||||
polygon_coords_str = request.GET.get("polygon", "").strip()
|
||||
@@ -198,7 +198,7 @@ class ShowSourceWithPointsMapView(LoginRequiredMixin, View):
|
||||
"source_objitems__geo_obj",
|
||||
).get(id=source_id)
|
||||
except Source.DoesNotExist:
|
||||
return redirect("mainapp:home")
|
||||
return redirect("mainapp:source_list")
|
||||
|
||||
groups = []
|
||||
|
||||
@@ -280,7 +280,7 @@ class ShowSourceAveragingStepsMapView(LoginRequiredMixin, View):
|
||||
"source_objitems__geo_obj",
|
||||
).get(id=source_id)
|
||||
except Source.DoesNotExist:
|
||||
return redirect("mainapp:home")
|
||||
return redirect("mainapp:source_list")
|
||||
|
||||
# Получаем все ObjItem, отсортированные по ID (порядок добавления)
|
||||
objitems = source.source_objitems.select_related(
|
||||
|
||||
Reference in New Issue
Block a user