Alias internal comments text

This commit is contained in:
richard-dds 2018-09-11 15:39:15 -04:00
parent b2dee75cf0
commit db43cb97dc
2 changed files with 5 additions and 1 deletions

View File

@ -165,3 +165,7 @@ class Request(Base):
@property @property
def reviews(self): def reviews(self):
return [status.review for status in self.status_events if status.review] return [status.review for status in self.status_events if status.review]
@property
def internal_comments_text(self):
return self.internal_comments.text if self.internal_comments else ""

View File

@ -32,7 +32,7 @@ def render_approval(request, form=None):
if pending_final_approval and request.task_order: if pending_final_approval and request.task_order:
data["task_order"] = task_order_dictionary(request.task_order) data["task_order"] = task_order_dictionary(request.task_order)
internal_comment_form = InternalCommentForm(text=request.internal_comments.text) internal_comment_form = InternalCommentForm(text=request.internal_comments_text)
return render_template( return render_template(
"requests/approval.html", "requests/approval.html",