Skip to content

Commit 14a5fa0

Browse files
committed
Allow additional property for project and tutorial
- informationPages - customOptions
1 parent 6597c97 commit 14a5fa0

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

mapswipe_workers/mapswipe_workers/generate_stats/overall_stats.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def get_project_static_info(filename: str) -> pd.DataFrame:
6464
project_details
6565
,regexp_replace(look_for, E'[\\n\\r]+', ' ', 'g' ) as look_for
6666
,project_type
67+
,image
6768
-- add an array of the tile server names
6869
,CASE
6970
WHEN project_type_specifics->'tileServer'->'name' IS NOT NULL THEN

mapswipe_workers/mapswipe_workers/project_types/base/project.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ def __init__(self, project_draft):
8989
)
9090

9191
self.tutorialId = project_draft.get("tutorialId", None)
92+
# XXX: Additional fields (Used in manager dashboard for now)
93+
self.informationPages = project_draft.get("informationPages", None)
94+
self.customOptions = project_draft.get("customOptions", None)
9295

9396
# TODO: Implement resultRequiredCounter as property.
9497
# Does not work because for some reason project['group'] = vars()

mapswipe_workers/mapswipe_workers/project_types/base/tutorial.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ def __init__(self, tutorial_draft):
2424
self.status = "tutorial"
2525
# need to filter out None values in list due to Firebase
2626
self.screens = list(filter(None, tutorial_draft["screens"]))
27+
# NOTE: Additional fields (Used in manager dashboard for now)
28+
self.informationPages = tutorial_draft.get("informationPages", None)
29+
self.customOptions = tutorial_draft.get("customOptions", None)
2730

2831
def save_tutorial(self):
2932
"""Save the tutorial in Firebase."""

0 commit comments

Comments
 (0)