Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/core/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ class PracticeAreaAdmin(admin.ModelAdmin):
@admin.register(Affiliate)
class AffiliateAdmin(admin.ModelAdmin):
list_display = (
"partner_name",
"partner_logo",
"name",
"logo",
"is_active",
"url",
"is_org_sponsor",
Expand Down
4 changes: 2 additions & 2 deletions app/core/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ class Meta:
model = Affiliate
fields = (
"uuid",
"partner_name",
"partner_logo",
"name",
"logo",
"is_active",
"url",
"is_org_sponsor",
Expand Down
6 changes: 3 additions & 3 deletions app/core/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ class AffiliateViewSet(viewsets.ModelViewSet):
# Optionally filter sponsor partners by name, is_active, and/or is_sponsor query parameters in the URL
# """
# queryset = Affiliate.objects.all()
# partner_name = self.request.query_params.get("partner_name")
# if partner_name is not None:
# queryset = queryset.filter(partner_name=partner_name)
# name = self.request.query_params.get("name")
# if name is not None:
# queryset = queryset.filter(name=name)
# is_active = self.request.query_params.get("is_active")
# if is_active is not None:
# queryset = queryset.filter(is_active=is_active)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.2.27 on 2026-02-20 02:57

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('core', '0052_useremploymenthistory'),
]

operations = [
migrations.RenameField(
model_name='affiliate',
old_name='partner_logo',
new_name='logo',
),
migrations.RenameField(
model_name='affiliate',
old_name='partner_name',
new_name='name',
),
]
2 changes: 1 addition & 1 deletion app/core/migrations/max_migration.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0052_useremploymenthistory
0053_rename_partner_logo_affiliate_logo_and_more
6 changes: 3 additions & 3 deletions app/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ class Affiliate(AbstractBaseModel):
Dictionary of sponsors and partners
"""

partner_name = models.CharField(max_length=255)
partner_logo = models.URLField(blank=True)
name = models.CharField(max_length=255)
logo = models.URLField(blank=True)
is_active = models.BooleanField(null=True)
url = models.URLField(blank=True)
is_org_sponsor = models.BooleanField(null=True)
Expand All @@ -255,7 +255,7 @@ class Affiliate(AbstractBaseModel):
# PK of this model is the ForeignKey for project_affiliate_xref

def __str__(self):
return f"{self.partner_name}"
return f"{self.name}"


class Faq(AbstractBaseModel):
Expand Down
2 changes: 1 addition & 1 deletion app/core/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def admin_client(admin, client):

@pytest.fixture
def affiliate():
return Affiliate.objects.create(partner_name="Test Affiliate")
return Affiliate.objects.create(name="Test Affiliate")


@pytest.fixture
Expand Down
4 changes: 2 additions & 2 deletions app/core/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ def test_create_event_type(auth_client):

def test_create_affiliate(auth_client):
payload = {
"partner_name": "Test Partner",
"partner_logo": "http://www.logourl.com",
"name": "Test Partner",
"logo": "http://www.logourl.com",
"is_active": True,
"url": "http://www.testurl.org",
"is_org_sponsor": True,
Expand Down