Loading resources/management/commands/fusefs.py +5 −3 Original line number Diff line number Diff line Loading @@ -29,9 +29,9 @@ def _db_obj_from_path(path: str, ttl_hash=None): except ValueError: return if not ext: return Collection.objects.get(pk=pk) return Collection.objects.filter(pk=pk).first() else: return Resource.objects.get(pk=pk) return Resource.objects.filter(pk=pk).first() return Loading @@ -45,9 +45,11 @@ class Ops(Operations): ex_collection-2/other_col-23/more_col-43/some_pic-374.jpg """ if path == "/": return self.root_collection obj = _db_obj_from_path(path, ttl_hash=get_ttl_hash()) if not obj: return self.root_collection raise FuseOSError(errno.ENOENT) else: return obj Loading Loading
resources/management/commands/fusefs.py +5 −3 Original line number Diff line number Diff line Loading @@ -29,9 +29,9 @@ def _db_obj_from_path(path: str, ttl_hash=None): except ValueError: return if not ext: return Collection.objects.get(pk=pk) return Collection.objects.filter(pk=pk).first() else: return Resource.objects.get(pk=pk) return Resource.objects.filter(pk=pk).first() return Loading @@ -45,9 +45,11 @@ class Ops(Operations): ex_collection-2/other_col-23/more_col-43/some_pic-374.jpg """ if path == "/": return self.root_collection obj = _db_obj_from_path(path, ttl_hash=get_ttl_hash()) if not obj: return self.root_collection raise FuseOSError(errno.ENOENT) else: return obj Loading