diff --git a/lib/widget/location_display.dart b/lib/widget/location_display.dart index b99c8077..75554e1a 100644 --- a/lib/widget/location_display.dart +++ b/lib/widget/location_display.dart @@ -170,7 +170,7 @@ class _LocationDisplayState extends RefreshableState { int pk = location?.pk ?? -1; - if (pk <= 0) { + if (location != null && pk <= 0) { return; } @@ -178,7 +178,7 @@ class _LocationDisplayState extends RefreshableState { context, L10().stockItemCreate, data: { - "location": pk, + "location": location != null ? pk : null, }, onSuccess: (result) async {