remove unnecessary officer properties on workspace
This commit is contained in:
parent
356a0fab2c
commit
65a88da63b
@ -63,21 +63,3 @@ class Workspace(Base, mixins.TimestampsMixin, mixins.AuditableMixin):
|
||||
return "<Workspace(name='{}', request='{}', user_count='{}', id='{}')>".format(
|
||||
self.name, self.request_id, self.user_count, self.id
|
||||
)
|
||||
|
||||
def _find_by_role(self, role):
|
||||
try:
|
||||
return [member for member in self.members if member.role.name == role]
|
||||
except StopIteration:
|
||||
return None
|
||||
|
||||
@property
|
||||
def contracting_officer(self):
|
||||
return self._find_by_role("contracting_officer")
|
||||
|
||||
@property
|
||||
def contracting_officer_representative(self):
|
||||
return self._find_by_role("contracting_officer_representative")
|
||||
|
||||
@property
|
||||
def security_officer(self):
|
||||
return self._find_by_role("security_officer")
|
||||
|
@ -161,7 +161,7 @@ class UpdateTaskOrderWorkflow(ShowTaskOrderWorkflow):
|
||||
if (
|
||||
hasattr(self.form, field)
|
||||
and self.form[field].data
|
||||
and not getattr(self.workspace, officer_type["role"])
|
||||
and not getattr(self.task_order, officer_type["role"])
|
||||
):
|
||||
prefix = officer_type["prefix"]
|
||||
officer_data = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user