Skip to content

Commit

Permalink
create get_request_group_and_file()
Browse files Browse the repository at this point in the history
  • Loading branch information
madwort committed Mar 27, 2024
1 parent 3ca8617 commit 0bbeea6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion airlock/business_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def get_contents_url(self, relpath, download=False):

return url

def get_request_file(self, relpath: UrlPath | str):
def get_request_group_and_file(self, relpath: UrlPath | str):
relpath = UrlPath(relpath)
group = relpath.parts[0]
file_relpath = UrlPath(*relpath.parts[1:])
Expand All @@ -375,6 +375,10 @@ def get_request_file(self, relpath: UrlPath | str):
if not (request_file := filegroup.files.get(file_relpath)):
raise BusinessLogicLayer.FileNotFound(relpath)

return group, request_file

def get_request_file(self, relpath: UrlPath | str):
_, request_file = self.get_request_group_and_file(relpath)
return request_file

def abspath(self, relpath):
Expand Down

0 comments on commit 0bbeea6

Please sign in to comment.