Make lifetime optional in the getBackwardsCompatibleMessage

This should fix the failing tests
This commit is contained in:
Konstantinos Karmas 2021-08-18 17:18:21 +02:00
parent a40c7e7410
commit 9f31e1421b
3 changed files with 24 additions and 20 deletions

View file

@ -531,8 +531,8 @@ class DigitalFactoryController(QObject):
getBackwardsCompatibleMessage(
text = "Failed to write to temporary file for '{}'.".format(file_name),
title = "File-system error",
lifetime = 10,
message_type_str="ERROR"
message_type_str="ERROR",
lifetime = 10
).show()
return
@ -546,8 +546,8 @@ class DigitalFactoryController(QObject):
getBackwardsCompatibleMessage(
text = "Failed Digital Library download for '{}'.".format(f),
title = "Network error {}".format(error),
lifetime = 10,
message_type_str="ERROR"
message_type_str="ERROR",
lifetime = 10
).show()
download_manager = HttpRequestManager.getInstance()
@ -592,10 +592,12 @@ class DigitalFactoryController(QObject):
if filename == "":
Logger.log("w", "The file name cannot be empty.")
getBackwardsCompatibleMessage(text = "Cannot upload file with an empty name to the Digital Library",
getBackwardsCompatibleMessage(
text = "Cannot upload file with an empty name to the Digital Library",
title = "Empty file name provided",
lifetime = 0,
message_type_str = "ERROR").show()
message_type_str = "ERROR",
lifetime = 0
).show()
return
self._saveFileToSelectedProjectHelper(filename, formats)