Skip to content

Commit

Permalink
fix: Airtable integration will accidentally reset stock quantity from…
Browse files Browse the repository at this point in the history
… 0 to (default) 1
  • Loading branch information
zetavg committed Jan 1, 2024
1 parent cb9a0f3 commit a9fbb65
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/integration-airtable/lib/conversions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ export async function itemToAirtableRecord(
? new Date(item.expiry_date).toISOString()
: null,
'Expire Soon Prior Days': item.expire_soon_prior_days || null,
'Stock Quantity': item.consumable_stock_quantity || null,
'Stock Quantity':
typeof item.consumable_stock_quantity === 'number'
? item.consumable_stock_quantity
: null,
'Stock Quantity Unit':
typeof item.consumable_stock_quantity_unit === 'string'
? item.consumable_stock_quantity_unit
Expand Down

0 comments on commit a9fbb65

Please sign in to comment.