media tracking references#6936
Conversation
…handle null values
…AB3325-AB3326-AB3327-AB3328-AB3329-AB3330-AB3331-Media-Tracking-References
Shazwazza
left a comment
There was a problem hiding this comment.
Have added some comments to the code, just small things - I'll fix them up now so you don't need to worry about it and then i'll test.
| { | ||
| var propValues = (JObject) o; | ||
|
|
||
| var contentType = GetElementType(propValues); |
There was a problem hiding this comment.
This is an N+1 call, but I realize that this is being done in the ConvertDbToString method too. I also realize that all content types are cached, so it's not hitting the DB each time but still something to ponder ;)
There was a problem hiding this comment.
On that note, this code is basically all duplicated from the ConvertDbToString method. We should prob make a re-usable method to do this iteration
There was a problem hiding this comment.
Actually this was also what I did first and I ended up in something similar to what you did, but I was not proud of the readability of the delegate similar to this: Action<string, PropertyType, JObject, int> onIteration. 😢
But the code duplication was not good either.
There was a problem hiding this comment.
Yeah, it's not the prettiest but I'll take it over the duplication, at least its isolated to this editor.
…es in the NC prop editor
…s, and one if the value was empty string.
Track references of documents and media from
Fixes AB#3325
Fixes AB#3326
Fixes AB#3327
Fixes AB#3328
Fixes AB#3329
Fixes AB#3331
Tests
Settings > Relation Types >Related Media > RelationsandSettings >Relation Types >Related Document > Relations