You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before pre_randomize() is called set_used_rand() is called on each field_model. This sets is_used_rand on each field depending on rand_mode and other factors. Disabling rand_mode in pre_randomize() doesn't change the is_used_rand field, which is the field that controls field randomization later.
Setting rand_mode in raw_mode() in turn calls the rand_mode() setter function. One possible fix would be to set is_used_rand here as well, which would probably do the right thing if setting rand_mode to False, but could enable a disabled field if rand_mode gets set to True? We could also allow only setting it to False here to avoid the False->True scenario.
obj.a is expected to be 0. But the output showed that obj.a had been randomized.
The text was updated successfully, but these errors were encountered: