diff options
Diffstat (limited to 'python/fatcat_web/entity_helpers.py')
-rw-r--r-- | python/fatcat_web/entity_helpers.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/python/fatcat_web/entity_helpers.py b/python/fatcat_web/entity_helpers.py index 9657e828..34a5ceb9 100644 --- a/python/fatcat_web/entity_helpers.py +++ b/python/fatcat_web/entity_helpers.py @@ -305,14 +305,16 @@ def _entity_edit_diff(entity_type: str, entity_edit: EntityEdit) -> List[str]: prev_revision redirect_ident """ - pop_fields = ["revision", "state"] - new_rev = generic_get_entity_revision(entity_type, entity_edit.revision) - new_toml = entity_to_toml(new_rev, pop_fields=pop_fields).split("\n") + pop_fields = ["ident", "revision", "state"] + new_rev = generic_get_entity_revision(entity_type, entity_edit.revision, enrich=False) + new_toml = entity_to_toml(new_rev, pop_fields=pop_fields).strip().split("\n") if len(new_toml) == 1 and not new_toml[0].strip(): new_toml = [] if entity_edit.prev_revision: - old_rev = generic_get_entity_revision(entity_type, entity_edit.prev_revision) - old_toml = entity_to_toml(old_rev, pop_fields=pop_fields).split("\n") + old_rev = generic_get_entity_revision( + entity_type, entity_edit.prev_revision, enrich=False + ) + old_toml = entity_to_toml(old_rev, pop_fields=pop_fields).strip().split("\n") fromdesc = f"/{entity_type}/rev/{entity_edit.prev_revision}.toml" else: old_toml = [] |