Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into fix-untitled-projects

* 'develop' of https://github.com/CenterForOpenScience/osf.io:
  Avoid AttributeErrors on DraftRegistrations
  • Loading branch information
John Tordoff committed Sep 26, 2023
2 parents 793f64d + 2dcc614 commit 04fe820
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/nodes/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ def get_current_user_permissions(self, obj):
user_perms = obj.get_permissions(user)[::-1]

user_perms = user_perms or default_perm
if not user_perms and user in obj.parent_admin_users:
if not user_perms and user in getattr(obj, 'parent_admin_users', []):
user_perms = [osf_permissions.READ]
return user_perms

Expand Down

0 comments on commit 04fe820

Please sign in to comment.