File tree Expand file tree Collapse file tree 1 file changed +12
-17
lines changed Expand file tree Collapse file tree 1 file changed +12
-17
lines changed Original file line number Diff line number Diff line change @@ -382,23 +382,18 @@ def is_allowed_to_edit(self, user):
382
382
Check if a user is allowed to edit this petition
383
383
"""
384
384
if self .owner_type == "user" :
385
- if self .user == user :
386
- # The user is the owner of the petition
387
- return True
388
- else :
389
- return False
390
- else :
391
- # But it is an org petition
392
- try :
393
- perm = Permission .objects .get (
394
- organization = self .org ,
395
- user = user
396
- )
397
- except Permission .DoesNotExist :
398
- # No such permission, denied
399
- return False
400
- else :
401
- return perm .can_modify_petitions
385
+ # The user is the owner of the petition
386
+ return self .user == user
387
+ # But it is an org petition
388
+ try :
389
+ perm = Permission .objects .get (
390
+ organization = self .org ,
391
+ user = user
392
+ )
393
+ except Permission .DoesNotExist :
394
+ # No such permission, denied
395
+ return False
396
+ return perm .can_modify_petitions
402
397
403
398
@property
404
399
def url (self ):
You can’t perform that action at this time.
0 commit comments