mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Fixing add new subscription action to use correct folders.
This commit is contained in:
parent
312a3fc8d5
commit
8aa50201eb
2 changed files with 6 additions and 2 deletions
|
@ -310,7 +310,10 @@ def api_folder_list(request, trigger_slug=None):
|
||||||
user = request.user
|
user = request.user
|
||||||
usf = UserSubscriptionFolders.objects.get(user=user)
|
usf = UserSubscriptionFolders.objects.get(user=user)
|
||||||
flat_folders = usf.flatten_folders()
|
flat_folders = usf.flatten_folders()
|
||||||
titles = [dict(label="All Site Stories", value="all")]
|
if 'add-new-subscription' in request.path:
|
||||||
|
titles = []
|
||||||
|
else:
|
||||||
|
titles = [dict(label="All Site Stories", value="all")]
|
||||||
|
|
||||||
for folder_title in sorted(flat_folders.keys()):
|
for folder_title in sorted(flat_folders.keys()):
|
||||||
if folder_title and folder_title != " ":
|
if folder_title and folder_title != " ":
|
||||||
|
|
|
@ -190,7 +190,8 @@ def add_object_to_folder(obj, in_folder, folders, parent='', added=False):
|
||||||
if isinstance(obj, dict):
|
if isinstance(obj, dict):
|
||||||
obj_identifier = obj.keys()[0]
|
obj_identifier = obj.keys()[0]
|
||||||
|
|
||||||
if (not in_folder and not parent and
|
if ((not in_folder or in_folder == " ") and
|
||||||
|
not parent and
|
||||||
not isinstance(obj, dict) and
|
not isinstance(obj, dict) and
|
||||||
obj_identifier not in folders):
|
obj_identifier not in folders):
|
||||||
folders.append(obj)
|
folders.append(obj)
|
||||||
|
|
Loading…
Add table
Reference in a new issue