Skip to content

Commit 1c8d6d2

Browse files
JacobCoffeeclaude
andcommitted
Fix review comments: restore null=True, fix None url, re-add listeners import
- Restore null=True on companies.Company contact/email/url fields to avoid unintended schema change (noqa DJ001 since removal needs migration) - Guard against None return from fix_image() in fix_success_story_images - Re-add jobs.listeners import in JobsAppConfig.ready() for signal registration - Prefix unused unpacked variables with underscore for RUF059 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent abc7cb2 commit 1c8d6d2

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

companies/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ class Company(NameSlugModel):
1414
"""A company that uses Python, displayed in the company directory."""
1515

1616
about = MarkupField(blank=True, default_markup_type=DEFAULT_MARKUP_TYPE)
17-
contact = models.CharField(blank=True, max_length=100)
18-
email = models.EmailField(blank=True)
19-
url = models.URLField("URL", blank=True)
17+
contact = models.CharField(blank=True, null=True, max_length=100) # noqa: DJ001
18+
email = models.EmailField(blank=True, null=True) # noqa: DJ001
19+
url = models.URLField("URL", blank=True, null=True) # noqa: DJ001
2020
logo = models.ImageField(upload_to="companies/logos/", blank=True, null=True)
2121

2222
class Meta:

jobs/apps.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ class JobsAppConfig(AppConfig):
1111

1212
def ready(self):
1313
"""Perform app initialization on startup."""
14+
import jobs.listeners # noqa: F401

pages/management/commands/fix_success_story_images.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ def process_success_story(self, page):
7070

7171
for path in image_paths:
7272
new_url = self.fix_image(path, page)
73+
if not new_url:
74+
continue
7375
content = page.content.raw
7476
new_content = content.replace(path, new_url)
7577
page.content = new_content

0 commit comments

Comments
 (0)