Skip to content
Snippets Groups Projects
Commit 89940f84 authored by Thomas Holene Løkkeborg's avatar Thomas Holene Løkkeborg
Browse files

#98 legg til støtte for import av CodePhraseModule

parent f29be0a6
No related branches found
No related tags found
1 merge request!73#98 Kodefrasemodul
Pipeline #83703 passed with stages
in 2 minutes and 24 seconds
......@@ -11,6 +11,7 @@ from soitool.modules.module_authentication_board import (
from soitool.modules.module_subtractorcodes import SubtractorcodesModule
from soitool.modules.module_freetext import FreeTextModule
from soitool.modules.module_predefined_codes import PredefinedCodesModule
from soitool.modules.module_code_phrase import CodePhraseModule
# Valid schema for serialized SOI
SERIALIZED_SOI_SCHEMA = Schema(
......@@ -328,6 +329,13 @@ def construct_modules_from_serialized(serialized_modules, database):
"meta": module["meta"],
}
)
elif module_type == "CodePhraseModule":
modules.append(
{
"widget": CodePhraseModule(data, database),
"meta": module["meta"],
}
)
else:
raise TypeError(
"Module-type '{}' is not recognized.".format(module_type)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment