Skip to content

Commit 8a4cd65

Browse files
committed
refactor: remove duplicate group object retrieval in group_show authorization
1 parent 4ddde25 commit 8a4cd65

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

  • ckanext/digitizationknowledge/logic

ckanext/digitizationknowledge/logic/auth.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ def group_show(context: Context, data_dict: DataDict) -> AuthResult:
2222
user = context.get('user')
2323
group = logic_auth.get_group_object(context, data_dict)
2424

25-
# We need the group object to check 'private'
26-
group = model.Group.get(group_id)
27-
if not group:
28-
# Delegate to core if not found, it will handle it (404)
29-
return {'success': True}
30-
3125
# Check if 'is_private' is set in extras
3226
is_private = group.extras.get('is_private', False)
3327

0 commit comments

Comments
 (0)