diff --git a/storage/admin.py b/storage/admin.py index ec0a231..5085253 100644 --- a/storage/admin.py +++ b/storage/admin.py @@ -43,8 +43,9 @@ class ItemAdmin(admin.ModelAdmin): def get_changeform_initial_data(self, request): data = { - 'parent': request.session.get('last-parent') + 'parent': request.GET.get('parent') or request.session.get('last-parent') } + data.update(super(ItemAdmin, self).get_changeform_initial_data(request)) return data diff --git a/storage/templates/item.html b/storage/templates/item.html index 03401c7..e74dbd2 100644 --- a/storage/templates/item.html +++ b/storage/templates/item.html @@ -83,6 +83,9 @@ {% empty %}