Skip to content

Commit 39e2d20

Browse files
committed
fix: add change log
1 parent 47de2be commit 39e2d20

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

CHANGELOG.md

+24
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
## [v0.1.3] - 2024-09-28
2+
3+
This release addresses a critical issue in the `Lisan` model where all fields from the main model were being included in the migration, even though only the fields defined in `lisan_fields` were expected to be migrated.
4+
5+
### Fixed
6+
- **Resolved Migration Issue for Lisan Model**:
7+
- Fixed an issue where the `Lisan` model migrations included all fields from the main model instead of only those listed in the `lisan_fields` attribute.
8+
- The `LisanModelMeta` metaclass now correctly filters out fields that are not translatable based on the `lisan_fields` list, ensuring that only the intended fields are migrated.
9+
- Added validation to ensure that any model using `LisanModelMixin` must define `lisan_fields`. If `lisan_fields` is missing, an `AttributeError` is raised during model initialization.
10+
11+
### Improved
12+
- **Automatic Field Filtering in Lisan Model**:
13+
- The dynamic `Lisan` model generation now strictly adheres to the `lisan_fields` specification, dynamically creating translation models with only the specified translatable fields.
14+
15+
### Migration Notes
16+
- A new migration is required to fix the schema of previously generated migrations for the `Lisan` model. After upgrading, run the following commands:
17+
18+
```bash
19+
python manage.py makemigrations
20+
python manage.py migrate
21+
```
22+
23+
---
24+
125
## [v0.1.2] - 2024-09-23
226

327
This release focuses on refining the multilingual handling capabilities by introducing additional flexibility in language detection and ensuring compatibility with supported languages.

0 commit comments

Comments
 (0)