Fix currentUpload() return value
This commit is contained in:
parent
25844a1f59
commit
e62af0f71f
|
@ -107,16 +107,19 @@ class Vessel:
|
|||
db = Database()
|
||||
return db.getCompletionForVessel(self)
|
||||
|
||||
def currentUpload(self) -> File:
|
||||
def currentUpload(self) -> Optional[File]:
|
||||
"""Get the File that is currently being uploaded to this Vessel
|
||||
|
||||
Returns:
|
||||
classes.file.File: File object representing the file currently
|
||||
being uploaded
|
||||
being uploaded, if any
|
||||
"""
|
||||
db = Database()
|
||||
directory, name, _ = db.getFileByUUID(
|
||||
output = db.getFileByUUID(
|
||||
fileuuid := self.connection.getCurrentUploadUUID())
|
||||
|
||||
if output:
|
||||
directory, name, _ = output
|
||||
return File(name, directory, fileuuid)
|
||||
|
||||
def clearTempDir(self) -> None:
|
||||
|
|
Loading…
Reference in a new issue