We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I do an Update on my Document, it inserts some weird values....
`function compareDB() { const firestore = getFireStore() const prodDB = firestore.query("ProTips").OrderBy("id").Execute() const stagingDB = firestore.query("ProTipsStaging").OrderBy("id").Execute()
for (var x = 0; x < prodDB.length; x++) { const prod = prodDB[x] const staging = stagingDB[x] if ((prod.fields.id['integerValue'] === staging.fields.id['integerValue']) && (prod.fields.id_pro['integerValue'] !== staging.fields.id_pro['integerValue'] || prod.fields.pro_tip_text['stringValue'] !== staging.fields.pro_tip_text['stringValue'] || prod.fields.date_published['timeStampValue'] !== staging.fields.date_published['timeStampValue'])) { // console.log('prod name:', prod.name) const splittedName = prod.name.split('/') const slicedName = splittedName.slice(-2) console.log(slicedName) const documentURL = ${slicedName[0]}/${slicedName[1]}/
${slicedName[0]}/${slicedName[1]}/
prod.fields = staging prod.fields.updated = true console.log("Updated Tip:", prod.fields) console.log('DocumentURL:', documentURL) const updatedProTip = firestore.updateDocument(documentURL, prod, ["id_pro","pro_tip_text","date_published"], true) console.log(updatedProTip) }
} // console.log(prodDB) }`
This is how it looks my firebase document before and after the update BEFORE:
AFTER:
Any Idea of why is this happening??
Thanks
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I do an Update on my Document, it inserts some weird values....
`function compareDB() {
const firestore = getFireStore()
const prodDB = firestore.query("ProTips").OrderBy("id").Execute()
const stagingDB = firestore.query("ProTipsStaging").OrderBy("id").Execute()
for (var x = 0; x < prodDB.length; x++) {
const prod = prodDB[x]
const staging = stagingDB[x]
if ((prod.fields.id['integerValue'] === staging.fields.id['integerValue']) &&
(prod.fields.id_pro['integerValue'] !== staging.fields.id_pro['integerValue'] ||
prod.fields.pro_tip_text['stringValue'] !== staging.fields.pro_tip_text['stringValue'] ||
prod.fields.date_published['timeStampValue'] !== staging.fields.date_published['timeStampValue'])) {
// console.log('prod name:', prod.name)
const splittedName = prod.name.split('/')
const slicedName = splittedName.slice(-2)
console.log(slicedName)
const documentURL =
${slicedName[0]}/${slicedName[1]}/
}
// console.log(prodDB)
}`
This is how it looks my firebase document before and after the update
BEFORE:
AFTER:
Any Idea of why is this happening??
Thanks
The text was updated successfully, but these errors were encountered: