Skip to content

Commit 2426448

Browse files
committed
⬆️ make filingcabinet compatible with treebeard v5
1 parent 8ffb530 commit 2426448

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies = [
1212
"django-json-widget",
1313
"jsonschema",
1414
"django-taggit>=2",
15-
"django-treebeard",
15+
"django-treebeard>=5",
1616
"djangorestframework",
1717
"reportlab",
1818
"celery",

src/filingcabinet/migrations/0026_auto_20220920_1828.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ def __init__(self):
1414
self.stmts = []
1515

1616

17-
NUM = NumConv(len(ALPHABET), ALPHABET)
17+
# inspired by https://github.com/django-cms/django-cms/commit/e0e55e59be84d4a3ee070aefcda7995cc1383afa
18+
try:
19+
NUM = NumConv(len(ALPHABET), ALPHABET)
20+
except TypeError:
21+
NUM = NumConv(ALPHABET)
1822

1923

2024
def _int2str(num):
@@ -151,7 +155,6 @@ def move_to_mp(apps, schema_editor):
151155

152156

153157
class Migration(migrations.Migration):
154-
155158
dependencies = [
156159
("filingcabinet", "0025_collectiondirectory_depth_and_more"),
157160
]

uv.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)