Skip to content

Commit

Permalink
v9.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
GitRon committed Jan 22, 2024
1 parent 559faf7 commit f1bcbe2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

**9.4.2** (2024-01-22)
* Fixed an SQLite bug in "PermissionSetupService"

**9.4.1** (2024-01-12)
* Updated testing docs

Expand Down
2 changes: 1 addition & 1 deletion ambient_toolbox/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Python toolbox of Ambient Digital containing an abundance of useful tools and gadgets."""

__version__ = "9.4.1"
__version__ = "9.4.2"
7 changes: 4 additions & 3 deletions ambient_toolbox/permissions/fixtures/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ def process(self) -> (List[Permission], List[Permission]):
for codename in permission_declaration.codename_list:
# Instantiate permission as ORM object
try:
# Cast strings to lower cases to avoid issues with SQLite
new_permission = Permission.objects.get_by_natural_key(
app_label=permission_declaration.app_label,
codename=codename,
model=permission_declaration.model,
app_label=permission_declaration.app_label.lower(),
codename=codename.lower(),
model=permission_declaration.model.lower(),
)
except Permission.DoesNotExist as e:
raise ValueError(f'Invalid permission "{permission_declaration.model}.{codename}" declared.') from e
Expand Down

0 comments on commit f1bcbe2

Please sign in to comment.