|
@@ -496,6 +496,10 @@ class ContentApi(object):
|
496
|
496
|
content_query = content_query.filter(
|
497
|
497
|
Content.parent_id == parent_folder.content_id,
|
498
|
498
|
)
|
|
499
|
+ else:
|
|
500
|
+ content_query = content_query.filter(
|
|
501
|
+ Content.parent_id == None,
|
|
502
|
+ )
|
499
|
503
|
|
500
|
504
|
# Filter with workspace
|
501
|
505
|
content_query = content_query.filter(
|
|
@@ -541,6 +545,9 @@ class ContentApi(object):
|
541
|
545
|
.filter(
|
542
|
546
|
Content.parent_id == folder.content_id,
|
543
|
547
|
)
|
|
548
|
+ else:
|
|
549
|
+ folder_query = folder_query \
|
|
550
|
+ .filter(Content.parent_id == None)
|
544
|
551
|
|
545
|
552
|
# Get thirst corresponding folder
|
546
|
553
|
folder = folder_query \
|