Get reference to revision object/pk in/after revision block.
See original GitHub issueApologies for posting a question here.
I’m using both reversion and activity-stream and want to add a reference to revisions from the activity. Activity-stream allows arbitrary data to be saved to the actions via a jsonfield.
My code currently looks like this. I’m hoping to patch in a reference to the revision in action.send.
with reversion.create_revision() and transaction.atomic():
reversion.set_comment('Updated')
model.save()
action.send(self.request.user, verb='updated', target=mode, revision_pk=?)
How do I get a reference to the revision?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Return a Specific Revision of An Object - java - Stack Overflow
The method that does not work is getRevisions(Object, Number) . It returns nothing for the before revision (that's correct), it returns still ...
Read more >Revision Tables and Revision Tags in Drawings | Inventor 2022
Revision tags indicate the revision for objects on the drawing sheet. ... Edit Revision Table Reference ... Post a question, get an answer....
Read more >inserting a revision history block - Inventor 2018 tutorials
In today's video Drafting Tutorials will show you how to input and edit a revision history block in a drawing for Inventor 2018....
Read more >7.1 Git Tools - Revision Selection
Revision Selection. Git allows you to refer to a single commit, set of commits, or range of commits in a number of ways....
Read more >Post Revisions | REST API Handbook
Query this endpoint to retrieve a collection of post revisions. The response you receive can be controlled and filtered using the URL query...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the insight. I think I’ve gotten my head a little further around how reversion works.
(More importantly I’ve an activity feed with version integration 😄
)
In case anyone comes across this later, the solution I came up with was a class
DoAction
to use in awith
block: https://gitlab.com/wjdp/xSACdb/blob/develop/src/xsd_frontend/activity.pyTo ‘approve a trip’ as in the above screenshot you would do: