diff options
Diffstat (limited to 'bitbake')
-rwxr-xr-x | bitbake/lib/toaster/toastergui/views.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 13788b0d55..22b26d0e83 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -1774,8 +1774,8 @@ if toastermain.settings.MANAGED: | |||
1774 | "projects": Project.objects.all(), | 1774 | "projects": Project.objects.all(), |
1775 | "MANAGED" : toastermain.settings.MANAGED | 1775 | "MANAGED" : toastermain.settings.MANAGED |
1776 | } | 1776 | } |
1777 | if 'project' in request.session: | 1777 | if 'project_id' in request.session: |
1778 | ret['project'] = request.session['project'] | 1778 | ret['project'] = Project.objects.get(pk = request.session['project_id']) |
1779 | return ret | 1779 | return ret |
1780 | 1780 | ||
1781 | # new project | 1781 | # new project |
@@ -1841,7 +1841,7 @@ if toastermain.settings.MANAGED: | |||
1841 | puser = None | 1841 | puser = None |
1842 | 1842 | ||
1843 | # we use implicit knowledge of the current user's project to filter layer information, e.g. | 1843 | # we use implicit knowledge of the current user's project to filter layer information, e.g. |
1844 | request.session['project'] = prj | 1844 | request.session['project_id'] = prj.id |
1845 | 1845 | ||
1846 | context = { | 1846 | context = { |
1847 | "project" : prj, | 1847 | "project" : prj, |
@@ -1937,8 +1937,8 @@ if toastermain.settings.MANAGED: | |||
1937 | (filter_string, search_term, ordering_string) = _search_tuple(request, Layer_Version) | 1937 | (filter_string, search_term, ordering_string) = _search_tuple(request, Layer_Version) |
1938 | 1938 | ||
1939 | queryset_all = Layer_Version.objects.all() | 1939 | queryset_all = Layer_Version.objects.all() |
1940 | if 'project' in request.session: | 1940 | if 'project_id' in request.session: |
1941 | queryset_all = queryset_all.filter(up_branch__in = Branch.objects.filter(name = request.session['project'].release.name)) | 1941 | queryset_all = queryset_all.filter(up_branch__in = Branch.objects.filter(name = Project.objects.get(pk = request.session['project_id']).release.name)) |
1942 | 1942 | ||
1943 | queryset_with_search = _get_queryset(Layer_Version, queryset_all, None, search_term, ordering_string, '-layer__name') | 1943 | queryset_with_search = _get_queryset(Layer_Version, queryset_all, None, search_term, ordering_string, '-layer__name') |
1944 | queryset = _get_queryset(Layer_Version, queryset_all, filter_string, search_term, ordering_string, '-layer__name') | 1944 | queryset = _get_queryset(Layer_Version, queryset_all, filter_string, search_term, ordering_string, '-layer__name') |
@@ -2023,8 +2023,8 @@ if toastermain.settings.MANAGED: | |||
2023 | (filter_string, search_term, ordering_string) = _search_tuple(request, Recipe) | 2023 | (filter_string, search_term, ordering_string) = _search_tuple(request, Recipe) |
2024 | 2024 | ||
2025 | queryset_all = Recipe.objects.all() | 2025 | queryset_all = Recipe.objects.all() |
2026 | if 'project' in request.session: | 2026 | if 'project_id' in request.session: |
2027 | queryset_all = queryset_all.filter(Q(layer_version__up_branch__in = Branch.objects.filter(name = request.session['project'].release.name)) | Q(layer_version__build__in = request.session['project'].build_set.all())) | 2027 | queryset_all = queryset_all.filter(Q(layer_version__up_branch__in = Branch.objects.filter(name = Project.objects.get(pk=request.session['project_id']).release.name)) | Q(layer_version__build__in = Project.objects.get(pk = request.session['project_id']).build_set.all())) |
2028 | 2028 | ||
2029 | queryset_with_search = _get_queryset(Recipe, queryset_all, None, search_term, ordering_string, '-name') | 2029 | queryset_with_search = _get_queryset(Recipe, queryset_all, None, search_term, ordering_string, '-name') |
2030 | queryset = _get_queryset(Recipe, queryset_all, filter_string, search_term, ordering_string, '-name') | 2030 | queryset = _get_queryset(Recipe, queryset_all, filter_string, search_term, ordering_string, '-name') |
@@ -2107,8 +2107,8 @@ if toastermain.settings.MANAGED: | |||
2107 | (filter_string, search_term, ordering_string) = _search_tuple(request, Machine) | 2107 | (filter_string, search_term, ordering_string) = _search_tuple(request, Machine) |
2108 | 2108 | ||
2109 | queryset_all = Machine.objects.all() | 2109 | queryset_all = Machine.objects.all() |
2110 | # if 'project' in request.session: | 2110 | # if 'project_id' in request.session: |
2111 | # queryset_all = queryset_all.filter(Q(layer_version__up_branch__in = Branch.objects.filter(name = request.session['project'].release.name)) | Q(layer_version__build__in = request.session['project'].build_set.all())) | 2111 | # queryset_all = queryset_all.filter(Q(layer_version__up_branch__in = Branch.objects.filter(name = Project.objects.get(request.session['project_id']).release.name)) | Q(layer_version__build__in = Project.objects.get(request.session['project_id']).build_set.all())) |
2112 | 2112 | ||
2113 | queryset_with_search = _get_queryset(Machine, queryset_all, None, search_term, ordering_string, '-name') | 2113 | queryset_with_search = _get_queryset(Machine, queryset_all, None, search_term, ordering_string, '-name') |
2114 | queryset = _get_queryset(Machine, queryset_all, filter_string, search_term, ordering_string, '-name') | 2114 | queryset = _get_queryset(Machine, queryset_all, filter_string, search_term, ordering_string, '-name') |