[unreleased regression] Editing a price field value creates a new price field value
I've traced the issue to this PR.
Steps to replicate
- Note the number of records in
civicrm_price_field_value
. - Create a new price set, and create a new price field in that price set. I used "numeric value/quantity"; not sure if it affects other code paths.
- Note the number of records in
civicrm_price_field_value
again. The number should have gone up by one, which is fine. - Edit the price field (you don't need to change anything, just press Edit then save).
- Note the number of records in
civicrm_price_field_value
again. The number went up by one another time as the price field value gets duplicated on each save.