diff --git a/bindings/python/fdb/tuple.py b/bindings/python/fdb/tuple.py index 62fe258035..30748ae0eb 100644 --- a/bindings/python/fdb/tuple.py +++ b/bindings/python/fdb/tuple.py @@ -180,8 +180,11 @@ class Versionstamp(object): return "Versionstamp(" + repr(self.tr_version) + ", " + str(self.user_version) + ")" def to_bytes(self): + tr_version = self.tr_version + if isinstance(tr_version, fdb.impl.Value): + tr_version = tr_version.value return struct.pack(self._STRUCT_FORMAT_STRING, - self.tr_version if self.is_complete() else self._UNSET_TR_VERSION, + tr_version if self.is_complete() else self._UNSET_TR_VERSION, self.user_version) def completed(self, new_tr_version):