If you are receiving this error message it's because the location the product has been allocated from does not exist anymore due to it being deleted.
β
To fix the issue you will need to transfer the affected inventory and product to a location that does exist, once this has been done you can Unallocate Stock from the Bulk Actions drop-down menu and wait for the system to automatically reprocess it.
Note: More about transferring inventory can be found on the Transfer Inventory article.