mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-16 04:05:28 +00:00
Label printing fix (#587)
* Handle blank URL provided for file download * Improved printing checks * Auto-select the correct printer
This commit is contained in:
@ -817,6 +817,11 @@ class InvenTreeAPI {
|
||||
*/
|
||||
Future<void> downloadFile(String url, {bool openOnDownload = true}) async {
|
||||
|
||||
if (url.isEmpty) {
|
||||
// No URL provided for download
|
||||
return;
|
||||
}
|
||||
|
||||
// Find the local downlods directory
|
||||
final Directory dir = await getTemporaryDirectory();
|
||||
|
||||
@ -1538,7 +1543,7 @@ class InvenTreeAPI {
|
||||
return setting.value;
|
||||
}
|
||||
|
||||
final response = await InvenTreeGlobalSetting().getModel(key);
|
||||
final response = await InvenTreeUserSetting().getModel(key);
|
||||
|
||||
if (response is InvenTreeUserSetting) {
|
||||
response.lastReload = DateTime.now();
|
||||
|
Reference in New Issue
Block a user