Skip to content

Commit 2376855

Browse files
committed
add tutorial creation workflow to run command
1 parent 1412188 commit 2376855

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

mapswipe_workers/mapswipe_workers/mapswipe_workers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ def run_team_management(team_name, team_id, action) -> None:
256256
sentry.capture_exception()
257257

258258

259-
@cli.command("create-tutorial")
260-
def run_create_tutorial() -> None:
259+
@cli.command("create-tutorials")
260+
def run_create_tutorials() -> None:
261261
"""Create a tutorial project from provided JSON file."""
262262

263263
fb_db = auth.firebaseDB()
@@ -374,6 +374,7 @@ def run(context, schedule):
374374
def _run():
375375
logger.info("start mapswipe backend workflow.")
376376
context.invoke(run_create_projects)
377+
context.invoke(run_create_tutorials)
377378
project_ids = context.invoke(run_firebase_to_postgres)
378379
context.invoke(run_generate_stats, project_ids=project_ids)
379380

mapswipe_workers/mapswipe_workers/project_types/base/tutorial.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def __init__(self, tutorial_draft):
1313
self.projectId = f"tutorial_{tutorial_draft['tutorialDraftId']}"
1414
self.lookFor = tutorial_draft["lookFor"]
1515
self.name = tutorial_draft["name"]
16+
self.tutorialDraftId = tutorial_draft["tutorialDraftId"]
1617
self.projectDetails = "This is a tutorial"
1718
self.progress = 0
1819
self.contributorCount = 0

0 commit comments

Comments
 (0)