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