Skip to content

Commit

Permalink
Version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
mesemus committed Nov 21, 2024
1 parent be90bd5 commit 3f6637a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions oarepo_communities/services/permissions/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,13 @@ class DefaultCommunityRoleMixin:
def _get_record_communities(self, record=None, **kwargs):
try:
return [str(record.parent.communities.default.id)]
except AttributeError:
raise MissingDefaultCommunityError(
f"Default community missing on record {record}."
)
except (AttributeError, TypeError) as e:
try:
return [str(record['parent']['communities']['default'])]
except KeyError:
raise MissingDefaultCommunityError(
f"Default community missing on record {record}."
)

def _get_data_communities(self, data=None, **kwargs):
community_id = (
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = oarepo-communities
version = 5.0.25
version = 5.1.0
description =
authors = Ronald Krist <[email protected]>
readme = README.md
Expand Down

0 comments on commit 3f6637a

Please sign in to comment.