I dont understand it much.. Rest were simple fix and have done that
2020-04-14 10526, 2020
Cyna
Mr_Monkey: I'd recommend upgrading the flow version for BB site. I've been facing some trouble with it lately on vscode requesting for version 0.75.0 and above which also crashes without an error log
2020-04-14 10550, 2020
D4RK-PH0ENiX joined the channel
2020-04-14 10552, 2020
Mr_Monkey
Hm
2020-04-14 10514, 2020
Mr_Monkey
Yes, that seems sensible, but as part of another PR I suppose
2020-04-14 10535, 2020
Cyna
Yea that sounds better
2020-04-14 10551, 2020
loujine_ is now known as loujine
2020-04-14 10503, 2020
Cyna
Please add an issue for in on BB, incase we forget it later on
so the delete is giving me the error of unhandled error
2020-04-14 10535, 2020
Mr_Monkey
Cyna: I think in handleDelete it might be better to stick either will .then() promises or async await. I suspect the issue you're running into is caused when some of your code is executed at the 'wrong' time and it would be a lot easier to see what's happening without the mix of both promise styles
2020-04-14 10530, 2020
Mr_Monkey
>so the delete is giving me the error of unhandled error
2020-04-14 10530, 2020
Mr_Monkey
What who where? If an error is thrown, the transaction is cancelled, which is why you'll see `transaction already completed`
2020-04-14 10502, 2020
Cyna
So should I change all to `async await` or `promises` ?
2020-04-14 10523, 2020
Cyna
I think async await would be a good choice 🤔
2020-04-14 10524, 2020
Mr_Monkey
Yep
2020-04-14 10538, 2020
Mr_Monkey
I agree. It's more work, but it's more readable.
2020-04-14 10502, 2020
Mr_Monkey
W'eve been slowly changing to async/await wherever we touch some old code
2020-04-14 10532, 2020
reosarevok
Cyna: left one comment, but otherwise looks ready to me, let's see what bitmap thinks :)
2020-04-14 10510, 2020
prabal
Mr_Monkey: u free for 10-15 min?
2020-04-14 10532, 2020
Mr_Monkey
prabal: I'm just about to have lunch, but I can ping you when I'm back
2020-04-14 10547, 2020
prabal
Yeah suree :)
2020-04-14 10510, 2020
c1e0 joined the channel
2020-04-14 10552, 2020
Cyna
Hey prabal, do you have much experience with converting async to promises and stuff ?
I think you can use options withRelated : ['parents'] to fetch parents in one go
2020-04-14 10549, 2020
prabal
option*
2020-04-14 10503, 2020
prabal
No nvm, I saw the code. Ignore what I said
2020-04-14 10521, 2020
Darkloke joined the channel
2020-04-14 10551, 2020
Mr_Monkey
prabal: Hi again ! I'm back. What's on your mind?
2020-04-14 10527, 2020
prabal
Hi
2020-04-14 10545, 2020
prabal
In one of the revisions, I only changed it's relationship, but the revision/id page was showing some other changes too - alias, etc.. it got me to some digging.
Because parentIDs array will be having other ids too
2020-04-14 10559, 2020
prabal
ids which correspond to other entity's parent id
2020-04-14 10508, 2020
Mr_Monkey
The line `{bbid: this.get('bbid')}` should make sure we're only returning items for this entity though. Are you sure it's returning revisions for other BBIDs?
2020-04-14 10514, 2020
prabal
Yes
2020-04-14 10523, 2020
prabal
Because the interferernce is possible
2020-04-14 10526, 2020
prabal
Especially
2020-04-14 10558, 2020
prabal
example
2020-04-14 10512, 2020
prabal
You form a relation between jk rowling and hp in revision number 1
2020-04-14 10513, 2020
Darkloke has quit
2020-04-14 10529, 2020
prabal
you modify jk rowling multiple 5 times
2020-04-14 10549, 2020
prabal
in revision number 7, you delete the relationship bw jk rowling and hp
2020-04-14 10502, 2020
prabal
parentId for jk rowling is actually 6
2020-04-14 10528, 2020
prabal
but because the parent of HP is 1, parentsIDs array will be having [1, 6]
2020-04-14 10539, 2020
Mr_Monkey
Yes, that's expected
2020-04-14 10559, 2020
prabal
While fetching parent for jk rowling
2020-04-14 10504, 2020
prabal
It can fetch revision number 1 too
2020-04-14 10539, 2020
Mr_Monkey
Through using this `parent()` function on the model, or through some other query?
I changed revision only.. But it is showing I made changes in the Begin Area too. Because the parent revision wasn't fetched properly
2020-04-14 10551, 2020
prabal
i changed the relationships only*
2020-04-14 10518, 2020
Mr_Monkey
Could you try and replicate that on test.bb ?
2020-04-14 10509, 2020
Mr_Monkey
I think contrarily to what I said that in your example revision #7 only has one parent revision #6, so it will only try to fetch authorRevision #6 for that BBID.
i think this can be fixed by having some sort query in which if multiple parentID are there that satisfy bbid = this.bbid , pick the one with highest parentID