Skip to content

A2: marker [❌ USUNIĘTY] przez with_deleted_marker#613

Open
mpasternak wants to merge 1 commit into
feat/pbn-d3-dict-syncfrom
feat/pbn-a2-deleted-marker
Open

A2: marker [❌ USUNIĘTY] przez with_deleted_marker#613
mpasternak wants to merge 1 commit into
feat/pbn-d3-dict-syncfrom
feat/pbn-a2-deleted-marker

Conversation

@mpasternak

Copy link
Copy Markdown
Member

Cel

Sześć modeli-luster PBN (institution, publication, conference,
publisher, journal, scientist) duplikowało w __str__ identyczny blok:

if self.is_deleted:
    ret = f"[❌ USUNIĘTY] {ret}"
return ret

Zastąpione wspólnym return self.with_deleted_marker(ret) z
BasePBNMongoDBModel (django-pbn-client 0.2.2, django-pbn-client#4).

Byte-identyczność

Istniejący test_models_deleted_marker.py (6 modeli × 2: deleted-ma-marker,
active-bez) przechodzi bez zmian — dowód, że zachowanie markera jest
identyczne. 12 passed.

Poza zakresem

bpp/views/autocomplete/authors.py też używa literału [❌ USUNIĘTY], ale w
innym kontekście (budowa części stringa, nie __str__ modelu) — zostaje.

Zależność / merge order

django-pbn-client pinowany git-source do feat/deleted-marker. Po wydaniu
0.2.2 na PyPI usunąć wpis. Merge po django-pbn-client#4.

Stack: na feat/pbn-d3-dict-sync (#612).

🤖 Generated with Claude Code

Sześć modeli-luster PBN (institution/publication/conference/publisher/
journal/scientist) duplikowało w __str__ ten sam blok
`if is_deleted: ret = f"[❌ USUNIĘTY] {ret}"`. Zastąpione wspólnym helperem
`self.with_deleted_marker(ret)` z BasePBNMongoDBModel (django-pbn-client 0.2.2).

Zachowanie pinowane istniejącym test_models_deleted_marker.py (6 modeli × 2)
— przechodzi bez zmian.

Zależność django-pbn-client 0.2.2 pinowana git-source (do usunięcia po PyPI).
Stack: na feat/pbn-d3-dict-sync.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant