Show user warning if receive quick lookup fails

just b/c a UPC doesn't exist yet doesn't prevent the batch from (in
some cases) adding a row for "unknown product" - but if the UPC is
sufficiently invalid, that can't happen
This commit is contained in:
Lance Edgar 2023-09-18 18:28:11 -05:00
parent a01fd62899
commit d1d69e9488

View file

@ -333,6 +333,9 @@ class APIBatchRowView(APIBatchMixin, APIMasterView):
msg = "Feature is not implemented" msg = "Feature is not implemented"
return {'error': msg} return {'error': msg}
if not row:
return {'error': "Could not identify product"}
self.Session.flush() self.Session.flush()
result = self._get(obj=row) result = self._get(obj=row)
result['ok'] = True result['ok'] = True