Hotfix user restrictor. Wrong usage of set's add method

This commit is contained in:
Finn Stutzenstein 2020-11-25 12:04:24 +01:00
parent 03cb8592fe
commit 4f24a38da8
No known key found for this signature in database
GPG Key ID: 9042F605C6324654

View File

@ -102,8 +102,7 @@ class UserAccessPermissions(BaseAccessPermissions):
# Find our model in full_data and get vote_delegated_from_users_id from it. # Find our model in full_data and get vote_delegated_from_users_id from it.
for user in full_data: for user in full_data:
if user["id"] == user_id: if user["id"] == user_id:
if len(user["vote_delegated_from_users_id"]) > 0: required_user_ids.update(user["vote_delegated_from_users_id"])
required_user_ids.add(*user["vote_delegated_from_users_id"])
break break
# Parse data. # Parse data.