Merge pull request 'refs #5094 fix get email' (!1548) from 5094-fix_email into test
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #1548 Reviewed-by: Vicent Llopis <vicent@verdnatura.es>
This commit is contained in:
commit
6f0c3eeb29
|
@ -58,7 +58,10 @@ module.exports = Self => {
|
|||
for (const param in args)
|
||||
params[param] = args[param];
|
||||
|
||||
if (!recipient) params.recipient = models.Client.findById(recipientId, {fields: ['email']});
|
||||
if (!recipient) {
|
||||
client = await models.Client.findById(recipientId, {fields: ['email']});
|
||||
params.recipient = client.email;
|
||||
}
|
||||
|
||||
const email = new Email('delivery-note', params);
|
||||
|
||||
|
|
Loading…
Reference in New Issue