fixed bug to output redandant sub_folders/files array list.
This commit is contained in:
parent
3012dc542c
commit
96637e2d12
@ -161,10 +161,10 @@ class LsCommand(BaseCommand):
|
|||||||
except UnauthorizedException:
|
except UnauthorizedException:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
data["sub_folders"] = (
|
data["sub_folders"] = list(
|
||||||
list(map(lambda x: self._folder2dict(x), sorted(folder.sub_folders, key=lambda x: x.name))),
|
map(lambda x: self._folder2dict(x), sorted(folder.sub_folders, key=lambda x: x.name))
|
||||||
)
|
)
|
||||||
data["files"] = (list(map(lambda x: self._file2dict(x), sorted(folder.files, key=lambda x: x.name))),)
|
data["files"] = list(map(lambda x: self._file2dict(x), sorted(folder.files, key=lambda x: x.name)))
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def _file2dict(self, file: File) -> dict:
|
def _file2dict(self, file: File) -> dict:
|
||||||
|
Loading…
Reference in New Issue
Block a user