Answer the question
In order to leave comments, you need to log in
How to add a value to an enum?
Once upon a time, an unfamiliar programmer added a prop to the products ТипТовара
and specified a value for it ПеречислениеСсылка.ТипТовара
. The enum ТипТовара
lists all possible values.
There was a task to add one more type. I go into the enumeration and just add a new value.
But after updating the database, I get an error about an unknown value that I added. Analyzing the code, it turns out that the attribute does not have a new value.
What's happening? Did I forget to update something?
Answer the question
In order to leave comments, you need to log in
Guys, I figured it out. Thanks to all. For each type of product there was a tab in the form of changing the nomenclature. The error was due to the fact that he could not find a tab for the new type that I added. After adding a new tab and copying the necessary fields into it, everything worked.
You need to add a new enumeration value in the Configurator mode.
What is not. There shouldn't be any mistakes. Let's take screenshots where we added the error screen.
But after updating the database, I get an error about an unknown value that I added. Analyzing the code, it turns out that the attribute does not have a new value.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question