-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
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
fix: restore ancestors and decendants on document graph #6646
fix: restore ancestors and decendants on document graph #6646
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you check whether the consumer of this data can handle a null
in the JSON here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be an analogous lookup of pages for the RFC case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.