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

# history.snapshots

## Overview

Rebuild a deleted row from the last thing history recorded about it.

## `last_recorded` {#last_recorded}

Return an unsaved ``model`` instance holding the row's last recorded values, or ``None``.

A deleted row still has to be nameable. A record that references one prints something about it,
and reading the live row would raise. The instance this returns is never saved; it exists so
``__str__`` and the like have the values they need.

``None`` comes back when the model records no history, or when history holds nothing for that
row. A field history excludes is simply absent from the instance, keeping its model default.

### Signature {#last_recorded-signature}

`last_recorded(model, pk)`

#### Parameters {#last_recorded-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="last_recorded-param-model">model</span> |  | yes |  |  |
| <span id="last_recorded-param-pk">pk</span> |  | yes |  |  |

### Source {#last_recorded-source}

`server/vueda/history/snapshots.py:6`

## Source

`server/vueda/history/snapshots.py`
