From 820190d9e6e7d354ee2a6859fa87a149f32af965 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 20 Jan 2019 15:53:42 +0530 Subject: [PATCH] allow adding to user or user:Public --- oml/user/api.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/oml/user/api.py b/oml/user/api.py index d4bf89a..d8fecfa 100644 --- a/oml/user/api.py +++ b/oml/user/api.py @@ -309,10 +309,12 @@ def addListItems(data): i = Item.get(item_id) i.queue_download() i.update() - elif data['list'] and (data['list'].startswith(':') or data['list'].endswith(':Public')): + elif data['list'] and (data['list'].startswith(':') or + data['list'].endswith(':Public') or + data['list'].enswtih(':')): l = models.List.get_or_create(data['list']) if l: - if l.name == 'Public' and l.user_id != settings.USER_ID: + if l.name in ('Public', '') and l.user_id != settings.USER_ID: state.tasks.queue('upload', { 'user': l.user_id, 'items': data['items']