correctly check credential permission on WFJT copy

This commit is contained in:
AlanCoding
2018-05-02 14:53:05 -04:00
parent 1d6b15a6a7
commit ec1e94376c
4 changed files with 15 additions and 3 deletions

View File

@@ -878,6 +878,9 @@ class CopyAPIView(GenericAPIView):
obj, field.name, field_val
)
new_obj = model.objects.create(**create_kwargs)
logger.debug(six.text_type('Deep copy: Created new object {}({})').format(
new_obj, model
))
# Need to save separatedly because Djang-crum get_current_user would
# not work properly in non-request-response-cycle context.
new_obj.created_by = creater