Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 056388a

Browse files
committed
adding some more debug
1 parent 001a187 commit 056388a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/services/ProcessorService.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,10 @@ async function createAchievement (userId, providerName, certifierId, certifiedDa
191191
*/
192192
async function createUserAttributes (userId, record) {
193193
let i = 1
194+
logger.debug(`*** createUserAttributes('${userId}','${record}')`)
194195
while (record[`attributeValue${i}`]) {
196+
logger.debug(`*** createUserAttributes: record number${i}`)
197+
195198
if ((!record[`attributeGroupName${i}`] || !record[`attributeName${i}`]) && record[`attributeValue${i}`]) {
196199
throw Error(`Attribute group name or attribute name is missing for user with id ${userId} and with attribute value ${record[`attributeValue${i}`]}`)
197200
} else if (!record[`attributeGroupName${i}`] || !record[`attributeName${i}`]) {
@@ -201,6 +204,7 @@ async function createUserAttributes (userId, record) {
201204
const attributeGroup = await helper.getUbahnSingleRecord('/attributeGroups', { name: record[`attributeGroupName${i}`] })
202205
const attribute = await helper.getUbahnSingleRecord('/attributes', { attributeGroupId: attributeGroup.id, name: record[`attributeName${i}`] })
203206
const value = _.toString(record[`attributeValue${i}`])
207+
logger.debug(`*** createUserAttributes: attribute/value = ${value}`)
204208

205209
const existingAttribute = await helper.getUbahnSingleRecord(`/users/${userId}/attributes/${attribute.id}`, {}, true)
206210

0 commit comments

Comments
 (0)