Water-Systems-Management-UCM / Waterspout

Server side API for ag water optimization model runner
MIT License
2 stars 0 forks source link

Entering out of bounds input for All Crops causes cards to be created with valid values but without "Auto Created" banner #68

Open nickrsan opened 3 years ago

nickrsan commented 3 years ago

[2:52 PM] Shivneel Chand Note sure if this is really a bug or not, but if I type in a value for yield% that is not allowed, such as 75%, everything functions correctly, and the box gets changed to the minimum allowed value (80), however, some of the crops appear without the "automatically added" tag ​[2:54 PM] Nick Santos Definitely a bug - thanks for catching that ​[2:55 PM] Nick Santos I suspect what's happening is that the way we currently track whether it's automatically added listens for an event showing that the card value changed after we auto-created it ​[2:56 PM] Nick Santos when we set the value too low, there's a race condition - the cards are getting created and are auto-added, but at the same time as they're created, they're getting a forced update as the bounds-check fails and updates the value to the minimum ​[2:56 PM] Nick Santos which creates an event that they changed, which then sets auto_added to false