maarch: use debug_ouput and logger.debug only in debug context (#78310)
gitea/passerelle-minint/pipeline/head This commit looks good
Details
gitea/passerelle-minint/pipeline/head This commit looks good
Details
This commit is contained in:
parent
cac4fc709e
commit
5d2943252e
|
@ -463,7 +463,8 @@ class AttachmentView(DetailView):
|
|||
|
||||
logger.debug('storeAttachment: start')
|
||||
|
||||
debug_output['res'] = []
|
||||
if debug:
|
||||
debug_output['res'] = []
|
||||
|
||||
# store attachments
|
||||
nbAttachments = len(attachments)
|
||||
|
@ -501,11 +502,12 @@ class AttachmentView(DetailView):
|
|||
resId, collId, attachment['content'], attachment['fileFormat'], attachment['filename']
|
||||
)
|
||||
res = sudsobject_to_dict(results)
|
||||
debug_output['res'].append(res)
|
||||
if debug:
|
||||
debug_output['res'].append(res)
|
||||
|
||||
if debug:
|
||||
data['debug'] = debug_output
|
||||
logger.debug('debug : %r', data['debug'])
|
||||
logger.debug('debug : %r', data['debug'])
|
||||
logger.debug('storeAttachment: resId:%r -- end', resId)
|
||||
return utils.response_for_json(request, data)
|
||||
|
||||
|
|
Loading…
Reference in New Issue