fix(stock-location,core-flows,types): updates existing address when updating stock location (#10832)

* fix(stock-location,core-flows,types): updates existing address when updating stock location address

* chore: use hasOne instead of hasMany
This commit is contained in:
Riqwan Thamir
2025-01-07 07:55:28 +01:00
committed by GitHub
parent fde73dbfae
commit 99a06102a2
10 changed files with 336 additions and 7 deletions
@@ -13,7 +13,7 @@ const StockLocationAddress = model
province: model.text().nullable(),
postal_code: model.text().nullable(),
metadata: model.json().nullable(),
stock_locations: model.hasMany(() => StockLocation, {
stock_locations: model.hasOne(() => StockLocation, {
mappedBy: "address",
}),
})