Relative Content

Tag Archive for pythondjangodjango-admin

Field value not being populated except when it’s being debugged

I’m having a weird problem where normally field_val should be set to some particular value but is being set to “”. When I debug in vscode and look into the value from the debugger, inspecting it (possibly triggering something), suddenly the variable becomes available. When I’m not debugging the value is empty string. I couldn’t understand what’s happening here. Is there some kind of lazy evaluation that I’m missing in django forms?