fix: restore ancestors and decendants on document graph - #6646
Conversation
jennifer-richards
left a comment
There was a problem hiding this comment.
This looks fine to me - a couple small questions inline
| history[url] = { | ||
| "name": d.name, | ||
| "rev": d.name, | ||
| "published": e and e.time.isoformat(), |
There was a problem hiding this comment.
Did you check whether the consumer of this data can handle a null in the JSON here?
There was a problem hiding this comment.
I did not, but it would mean we have an RFC without a published event, which is an anomaly and the consequence would be that the graph doesn't display.
| 'url': url, | ||
| } | ||
| if d.history_set.filter(rev=e.newrevisiondocevent.rev).exists(): | ||
| history[url]['pages'] = d.history_set.filter(rev=e.newrevisiondocevent.rev).first().pages |
There was a problem hiding this comment.
Should there be an analogous lookup of pages for the RFC case?
There was a problem hiding this comment.
good question - I'm not sure where it's used. It isn't used for this particular graph.
There was a problem hiding this comment.
I don't see that we use it, though we do describe using this endpoint as part of the API so outsiders might be using it.
No description provided.