From e1039fc148e12bb3a0c0b4346d00dd71906dd5ea Mon Sep 17 00:00:00 2001 From: Alejandro Sanchez Date: Mon, 9 Dec 2024 23:45:23 +0000 Subject: [PATCH] converted urlfield to string in asset.template_url to allow to "self" --- breathecode/authenticate/flags.py | 2 +- breathecode/payments/flags.py | 2 +- .../0053_alter_asset_template_url.py | 24 +++++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 breathecode/registry/migrations/0053_alter_asset_template_url.py diff --git a/breathecode/authenticate/flags.py b/breathecode/authenticate/flags.py index a83082775..40a122249 100644 --- a/breathecode/authenticate/flags.py +++ b/breathecode/authenticate/flags.py @@ -2,7 +2,7 @@ from capyc.core.managers import feature -flags = feature.flags +flags = feature._flags @feature.availability("authenticate.set_google_credentials") diff --git a/breathecode/payments/flags.py b/breathecode/payments/flags.py index d54ce2483..1e5ee5f31 100644 --- a/breathecode/payments/flags.py +++ b/breathecode/payments/flags.py @@ -11,7 +11,7 @@ from breathecode.registry.models import Asset from breathecode.utils.decorators.consume import ServiceContext -flags = feature.flags +flags = feature._flags @feature.availability("payments.bypass_consumption") diff --git a/breathecode/registry/migrations/0053_alter_asset_template_url.py b/breathecode/registry/migrations/0053_alter_asset_template_url.py new file mode 100644 index 000000000..1d074a5b0 --- /dev/null +++ b/breathecode/registry/migrations/0053_alter_asset_template_url.py @@ -0,0 +1,24 @@ +# Generated by Django 5.1.1 on 2024-12-09 23:36 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("registry", "0052_assettechnology_marketing_information"), + ] + + operations = [ + migrations.AlterField( + model_name="asset", + name="template_url", + field=models.CharField( + blank=True, + default=None, + help_text="This template will be used to open the asset (only applied for projects). If project has no template it should state 'self' as template url", + max_length=500, + null=True, + ), + ), + ]