summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/entity_helpers.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-06-13 11:02:40 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-06-13 11:02:40 -0700
commit71f2816bef7fec5e7d2c4bca6681569781ef85fb (patch)
treeae27ad5f6e0881a4aa1fbdb2711f53d0ad76d243 /python/fatcat_web/entity_helpers.py
parentef7fafdcb664f9c419069b41d743f69382571f98 (diff)
downloadfatcat-71f2816bef7fec5e7d2c4bca6681569781ef85fb.tar.gz
fatcat-71f2816bef7fec5e7d2c4bca6681569781ef85fb.zip
container revision view
Diffstat (limited to 'python/fatcat_web/entity_helpers.py')
-rw-r--r--python/fatcat_web/entity_helpers.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/python/fatcat_web/entity_helpers.py b/python/fatcat_web/entity_helpers.py
index 28ed3045..ba481ddd 100644
--- a/python/fatcat_web/entity_helpers.py
+++ b/python/fatcat_web/entity_helpers.py
@@ -17,6 +17,16 @@ def generic_get_entity(entity_type, ident):
except ApiException as ae:
abort(ae.status)
+def generic_get_entity_revision(entity_type, revision_id):
+ try:
+ if entity_type == 'container':
+ entity = api.get_container_revision(revision_id)
+ return entity
+ else:
+ raise NotImplementedError
+ except ApiException as ae:
+ abort(ae.status)
+
def generic_get_editgroup_entity(editgroup, entity_type, ident):
if entity_type == 'container':
edits = editgroup.edits.containers