Fix None bug
This commit is contained in:
parent
ba96d83db8
commit
e24c208e1d
1 changed files with 7 additions and 5 deletions
|
@ -187,14 +187,16 @@ class PostView(TitleMixin, CommentedDetailView, PageVoteDetailView, BookMarkDeta
|
||||||
context["editable_orgs"] = []
|
context["editable_orgs"] = []
|
||||||
|
|
||||||
can_edit = False
|
can_edit = False
|
||||||
if self.request.profile.id in self.object.get_authors():
|
|
||||||
can_edit = True
|
|
||||||
|
|
||||||
orgs = list(self.object.organizations.all())
|
orgs = list(self.object.organizations.all())
|
||||||
for org in orgs:
|
|
||||||
if org.is_admin(self.request.profile):
|
if self.request.profile:
|
||||||
|
if self.request.profile.id in self.object.get_authors():
|
||||||
can_edit = True
|
can_edit = True
|
||||||
|
|
||||||
|
for org in orgs:
|
||||||
|
if org.is_admin(self.request.profile):
|
||||||
|
can_edit = True
|
||||||
|
|
||||||
if can_edit:
|
if can_edit:
|
||||||
for org in orgs:
|
for org in orgs:
|
||||||
if org.is_member(self.request.profile):
|
if org.is_member(self.request.profile):
|
||||||
|
|
Loading…
Reference in a new issue