Skip to content

Commit 371e14d

Browse files
archTortugaxclaude
authored andcommitted
fix: pin pypi-publish to SHA; add migration 0015 for slug unique_with
- Pin pypa/gh-action-pypi-publish to full commit SHA (cef2210) instead of mutable release/v1 tag; keep tag as trailing comment - Add migration 0015 to capture unique_with=("region","subregion") on AbstractCity.slug added in the maintenance pass — state-only change, no SQL DDL emitted by autoslug Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 98bab18 commit 371e14d

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

.github/workflows/python-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ jobs:
2828
- name: Build package
2929
run: python -m build
3030
- name: Publish package
31-
uses: pypa/gh-action-pypi-publish@release/v1
31+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
3232
with:
3333
password: ${{ secrets.PYPI_API_TOKEN }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Capture unique_with=("region", "subregion") added to AbstractCity.slug.
2+
# This is an application-level change only (autoslug enforces uniqueness in
3+
# Python); no SQL DDL is emitted, but the migration state must match the model.
4+
5+
import autoslug.fields
6+
from django.db import migrations
7+
8+
9+
class Migration(migrations.Migration):
10+
dependencies = [
11+
("cities_light", "0014_fix_search_names_index"),
12+
]
13+
14+
operations = [
15+
migrations.AlterField(
16+
model_name="city",
17+
name="slug",
18+
field=autoslug.fields.AutoSlugField(
19+
editable=False,
20+
populate_from="name_ascii",
21+
unique_with=("region", "subregion"),
22+
verbose_name="slug",
23+
),
24+
),
25+
]

0 commit comments

Comments
 (0)