sobjornstad/TiddlyRemember

Password isn't saved when editing the config of a wiki created from < 1.3.0

Closed this issue · 2 comments

In _save_wiki_values(), we figure out what fields to save based on the current .keys() of the wiki config. This doesn't work correctly if we've added a new field to the schema since the config file was created, as the new fields in the config dialog will be skipped.

Better approach: extract the logic that builds the prototype in add_wiki() to a separate function and call said function to obtain the keys; this will ensure that any added values get created. Or get rid of using a prototype at all; I did this initially because the fields are already defined in config.json and I figured this should be kept DRY, but it might be less confusing / more reliable to leave the dictionary blank in config.json and define the structure in code, if there are going to be changes to the schema with any regularity at all.

Fixed in next version.