---
url: "https://vueda.dev/v3/reference/api/py/vueda.history.revision/ObjectRevisionField.md"
title: "ObjectRevisionField"
---

# ObjectRevisionField

## Overview

Publishes the annotated revision as ``app_label.Model:event_id``.

Null when the object has no events yet, which is what a row written before its model was
tracked looks like. It names the tracked model rather than the event model, so the value stays
stable if the backend's own naming changes.

## `__init__` {#--init--}

When a field is instantiated, we store the arguments that were used,
so that we can present a helpful representation of the object.

### Signature {#--init---signature}

`__init__(args, kwargs)`

#### Parameters {#--init---parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="--init---param-args">args</span> |  | no |  |  |
| <span id="--init---param-kwargs">kwargs</span> |  | no |  |  |

### Source {#--init---source}

`.venv/lib/python3.12/site-packages/rest_framework/fields.py:615`

## `to_representation` {#to_representation}

Transform the *outgoing* native value into primitive data.

### Signature {#to_representation-signature}

`to_representation(self, instance)`

#### Parameters {#to_representation-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| self |  | yes |  |  |
| <span id="to_representation-param-instance">instance</span> |  | yes |  |  |

### Source {#to_representation-source}

`server/vueda/history/revision.py:99`

## Source

`server/vueda/history/revision.py:83`
