From a6eab76ab79004d453c36f14eb1444c75afba376 Mon Sep 17 00:00:00 2001 From: Montana Date: Wed, 6 Feb 2019 13:38:27 -0500 Subject: [PATCH] Rename --- atst/models/task_order.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atst/models/task_order.py b/atst/models/task_order.py index e03cbdd9..170e3be4 100644 --- a/atst/models/task_order.py +++ b/atst/models/task_order.py @@ -94,12 +94,12 @@ class TaskOrder(Base, mixins.TimestampsMixin): def pdf(self, new_pdf): self._pdf = self._set_attachment(new_pdf, "_pdf") - def _set_attachment(self, new_attachment, property): + def _set_attachment(self, new_attachment, attribute): if isinstance(new_attachment, Attachment): return new_attachment elif isinstance(new_attachment, FileStorage): return Attachment.attach(new_attachment, "task_order", self.id) - elif not new_attachment and hasattr(self, property): + elif not new_attachment and hasattr(self, attribute): return None else: raise TypeError("Could not set attachment with invalid type")