Skip to content

[BUG] Changing an Onsite Installation to a Remote Installation generates error #520

Description

@danry25

What is broken?
Changing an Onsite Installation to a Remote Installation shows an error and does not save:

Failed to update this order! 😠 The property 'ProductOrder.ProductOrderId' has a temporary value while attempting to change the entity's state to 'Deleted'. Either set a permanent value explicitly, or ensure that the database is configured to generate values for this property. at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.InternalEntryBase.SetEntityState(EntityState oldState, EntityState newState, Boolean acceptChanges, Boolean modifyProperties) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.InternalEntityEntry.SetEntityState(EntityState entityState, Boolean acceptChanges, Boolean modifyProperties, Nullable1 forceStateWhenUnknownKey, Nullable1 fallbackState) at Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry.set_State(EntityState value) at Microsoft.EntityFrameworkCore.DbContext.Remove[TEntity](TEntity entity) at NumberSearch.Ops.Controllers.OrdersController.OrderUpdate(Order order) in /home/vsts/work/1/s/NumberSearch.Ops/Controllers/OrdersController.cs:line 525

To Reproduce
Steps to reproduce the behavior:

  1. Go to a quote
  2. Click on Onsite Installation toggle
  3. Press green Update button
  4. See error

Expected behavior
Changing the Onsite Installation toggle in Ops and pressing Update should save this as a Remote Installation.

Screenshots

Image

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingexternalHelps an external customerinternalHelps an internal customer

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions