From 14e29cb9aec4b31aa86f4b9af5bb3e50500fa958 Mon Sep 17 00:00:00 2001 From: Alejandro Sanchez Date: Mon, 9 Dec 2024 16:18:57 -0500 Subject: [PATCH] Update tasks.py --- breathecode/registry/tasks.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/breathecode/registry/tasks.py b/breathecode/registry/tasks.py index 162fac918..e29ea0b88 100644 --- a/breathecode/registry/tasks.py +++ b/breathecode/registry/tasks.py @@ -83,7 +83,13 @@ def async_pull_project_dependencies(asset_slug): target_asset = asset if asset.template_url is not None and asset.template_url != "": - target_asset = Asset.get_by_github_url(asset.template_url) + + # To avoid legacy issues we have to mark assets.template_url as "self" when no template is needed + if asset.template_url == "self": + target_asset = asset + else: + target_asset = Asset.get_by_github_url(asset.template_url) + if target_asset is None: raise Exception( f"Asset {asset_slug} template {asset.template_url} not found in the database as another asset"