Add the no_truncate parameter to the job and adhoc event sublist views

which are the ones that the CLI actually uses.
This commit is contained in:
Jeff Bradberry
2019-10-28 12:51:14 -04:00
committed by Ryan Petrello
parent a23754897e
commit aff31ac02f
3 changed files with 59 additions and 18 deletions

View File

@@ -270,3 +270,11 @@ class ControlledByScmMixin(object):
obj = super(ControlledByScmMixin, self).get_parent_object()
self._reset_inv_src_rev(obj)
return obj
class NoTruncateMixin(object):
def get_serializer_context(self):
context = super().get_serializer_context()
if self.request.query_params.get('no_truncate'):
context.update(no_truncate=True)
return context