(root)/ – Rev 37272
Rev 37271 |
Rev 37273 |
Go to most recent revision |
Compare with Previous |
Directory listing |
View Log
| RSS feed
Last modification
- Rev 37272 – 14 h 58 m
- Author: amit
- Log message:
- Fix duplicate super-catalog mapping rows on save
The add-row flow in super_catalog.js always posts mapping id 0, so saving a
catalog that was already mapped inserted a second row. That duplicated the
catalog inside superCatalogVariants_s, which surfaced as repeated storage
variant chips on the partner catalog card.
processCatalogMapping now falls back to a (catalogId, superCatalogId) lookup
when no mapping id is supplied and updates the existing row instead of
inserting. Also removes a latent NPE when a stale mapping id was posted.
Backed by a new UNIQUE(catalog_id, super_catalog_id) on
catalog.super_catalog_mapping; 5 pre-existing surplus rows were removed.