Edit flavor is implemented as deleting the original flavor and creating a new flavor with the respective fields.
The first time one "edits" a flavor this works, the fields get set and the database id assigned is +1 the largest flavor-id in the system. The second time one tries to edit the same flavor, oddly this does not quite work the same way.
Consequently, the display on the flavor list page seems all correct, but when one clicks on a flavor to edit it, the field values do not quite match those displayed in the flavor list page.
It feels like the largest_id computation is unstable.
if flavors:
largest_id = max(flavors, key=lambda f: f.id).id
flavor_id = int(largest_id) + 1
All this stems from the way flavor-id is handled on create and edit, related to #952657
To reproduce .. try editting "m1.tiny" root-disk to "10", view the flavor list, its flavor-id becomes 6, root-disk value becomes 10, all fine. Now edit it again, change name to m1.tiny.1 and then view flavor list and this is when you see inconsistencies.