Skip to content
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

versions: dump latest_id and next_draft_id as string #279

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions invenio_drafts_resources/records/systemfields/versions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021-2023 CERN.
# Copyright (C) 2024 TU Wien.
#
# Invenio-Drafts-Resources is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more
Expand Down Expand Up @@ -148,9 +149,9 @@ def set_latest(self):
def dump(self):
"""Dump the versions state to the index."""
return dict(
latest_id=self.latest_id,
latest_id=str(self.latest_id) if self.latest_id else None,
latest_index=self.latest_index,
next_draft_id=self.next_draft_id,
next_draft_id=str(self.next_draft_id) if self.next_draft_id else None,
is_latest=self.is_latest,
is_latest_draft=self.is_latest_draft,
index=self.index,
Expand Down
Loading