Which tool versions are you using?
SDK: v14.11.0
Platform: v24.06.6
Python: v3.12.3
Isolation mode: venv
Current Behavior
A field that was filled properly in the āDevelopmentā workspace thanks to a callback function is now empty at all times once the app is published.
ā¦
Expected Behavior
I should behave like it does when started in the āDevelopmentā workspace with a terminal call to viktor-cli start.
I fill a field with IDs separated by a comma in a first Step :
(I used the same for both the Development workspace and the one for the published app and tried others input aswell).
This is what i get in the Development workspace :
And in the published version workspace :
Thanks for your attention.
Hi @SolalSPC ,
Could you share what the callback function does? From where does it retrieve the options?
Hereās the callback function :
def createFdesPepOptions(params,**kwargs):
if database == {}:
return []
else:
idlist = [x[0] for x in database.items()]
fdes_pep_options = [OptionListElement(id, label = id + ' - ' + database[id]['Nom du produit'][0][:109]) for id in idlist]
if fdes_pep_options == None :
return []
return fdes_pep_options
To give you some context, database is a json-formatted string that I declare as a global variable in app.py, it is then overwriten with data retrieved through an API when the user types in some IDs in a text field.
This callback function is used to display options on the next Step depending on the IDs given by users at the first Step.
Thanks in advance.
Maybe thereās a difference when calling the API? are you using an environment variable of some sorts to authenticate?
Itās very difficult to help you without a full example showing the problem. I cannot replicate the difference on callback behavior between development and production.
Yes, I understand, Iāll continue to investigate, Iāll post an update there when I fix the problem.