Skip to content

Commit

Permalink
Add templates before editing them
Browse files Browse the repository at this point in the history
Fixes #118
  • Loading branch information
zjosua committed Nov 17, 2023
1 parent a10f059 commit 5ce2159
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/multiple_choice/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@

# default configurations
# TODO: update version number before release
default_conf_local = {"version": "2.10.2"}
default_conf_syncd = {"version": "2.10.2"}
default_conf_local = {"version": "2.10.3"}
default_conf_syncd = {"version": "2.10.3"}


def getSyncedConfig():
Expand Down
4 changes: 2 additions & 2 deletions src/multiple_choice/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,16 +193,16 @@ def addModel(col: Collection) -> dict[str, Any]:
models = col.models
model = models.new(aio_model_name)
model["type"] = MODEL_STD
model["sortf"] = 0 # set sortfield to question

add_fields(models, model)

# Add template
template = models.new_template(aio_card)
models.add_template(model, template)

fillTemplateAndModelFromFile(model)

model["sortf"] = 0 # set sortfield to question
models.add_template(model, template)
models.add(model)
return model

Expand Down

0 comments on commit 5ce2159

Please sign in to comment.