Skip to content

Commit

Permalink
Update tasks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
alesanchezr authored Dec 9, 2024
1 parent dc81b9e commit 14e29cb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion breathecode/registry/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 14e29cb

Please sign in to comment.