diff --git a/src/safe_apps/migrations/0016_alter_socialprofile_platform.py b/src/safe_apps/migrations/0016_alter_socialprofile_platform.py new file mode 100644 index 00000000..8034f42c --- /dev/null +++ b/src/safe_apps/migrations/0016_alter_socialprofile_platform.py @@ -0,0 +1,26 @@ +# Generated by Django 5.1.4 on 2025-01-13 11:38 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("safe_apps", "0015_safeapp_featured"), + ] + + operations = [ + migrations.AlterField( + model_name="socialprofile", + name="platform", + field=models.CharField( + choices=[ + ("DISCORD", "Discord"), + ("GITHUB", "Github"), + ("TWITTER", "Twitter"), + ("TELEGRAM", "Telegram"), + ], + max_length=255, + ), + ), + ] diff --git a/src/safe_apps/models.py b/src/safe_apps/models.py index 504a2ae2..b2cf820f 100644 --- a/src/safe_apps/models.py +++ b/src/safe_apps/models.py @@ -119,6 +119,7 @@ class Platform(models.TextChoices): DISCORD = "DISCORD" GITHUB = "GITHUB" TWITTER = "TWITTER" + TELEGRAM = "TELEGRAM" safe_app = models.ForeignKey(SafeApp, on_delete=models.CASCADE) platform = models.CharField(choices=Platform.choices, max_length=255) diff --git a/src/safe_apps/tests/test_views.py b/src/safe_apps/tests/test_views.py index 22c9dd72..dd1a6ce1 100644 --- a/src/safe_apps/tests/test_views.py +++ b/src/safe_apps/tests/test_views.py @@ -866,6 +866,9 @@ def test_multiple_social_profiles(self) -> None: social_profile_3 = SocialProfileFactory.create( platform=SocialProfile.Platform.TWITTER, safe_app=safe_app ) + social_profile_4 = SocialProfileFactory.create( + platform=SocialProfile.Platform.TELEGRAM, safe_app=safe_app + ) url = reverse("v1:safe-apps:list") response = self.client.get(path=url, data=None, format="json") @@ -883,6 +886,10 @@ def test_multiple_social_profiles(self) -> None: "platform": "GITHUB", "url": social_profile_2.url, }, + { + "platform": "TELEGRAM", + "url": social_profile_4.url, + }, { "platform": "TWITTER", "url": social_profile_3.url,