Skip to content

Commit

Permalink
default theme created when uploading template (#424)
Browse files Browse the repository at this point in the history
* default theme created when uploading template

* if repo_url is not defined then non git mode will be used for release
  • Loading branch information
deepakdinesh1123 authored Dec 17, 2024
1 parent c05f09b commit edb978f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions backend/src/zango/apps/shared/tenancy/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@ def initialize_workspace(tenant_uuid, app_template_path=None):
tenant.deployed_on = timezone.now()
tenant.save(update_fields=["status", "deployed_on"])

theme = ThemesModel.objects.create(
name="Default", tenant=tenant, config=DEFAULT_THEME_CONFIG
)

if not app_template_path:
assign_policies_to_anonymous_user(tenant.schema_name)
theme = ThemesModel.objects.create(
name="Default", tenant=tenant, config=DEFAULT_THEME_CONFIG
)
else:
try:
subprocess.run(
Expand Down
2 changes: 1 addition & 1 deletion backend/src/zango/cli/update_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ def update_apps(app_name):
git_mode = False
extra_config = tenant_obj.extra_config or {}
git_settings = extra_config.get("git_config")
if git_settings:
if git_settings and git_settings.get("repo_url", None):
git_mode = True
# Initialize git repository
repo_url = git_settings["repo_url"]
Expand Down

0 comments on commit edb978f

Please sign in to comment.