Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
soitool
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bachelor-paa-bittet
soitool
Commits
89940f84
Commit
89940f84
authored
4 years ago
by
Thomas Holene Løkkeborg
Browse files
Options
Downloads
Patches
Plain Diff
#98 legg til støtte for import av CodePhraseModule
parent
f29be0a6
No related branches found
Branches containing commit
No related tags found
1 merge request
!73
#98 Kodefrasemodul
Pipeline
#83703
passed with stages
in 2 minutes and 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
soitool/serialize_export_import_soi.py
+8
-0
8 additions, 0 deletions
soitool/serialize_export_import_soi.py
with
8 additions
and
0 deletions
soitool/serialize_export_import_soi.py
+
8
−
0
View file @
89940f84
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment