Skip to content
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
10 changes: 9 additions & 1 deletion simple_history/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import uuid
import warnings
from functools import partial
from typing import TypeVar

from django.apps import apps
from django.conf import settings
Expand Down Expand Up @@ -45,6 +46,13 @@
except ImportError:
from threading import local as LocalContext


# __set__ value type
_ST = TypeVar("_ST")
# __get__ return type
_GT = TypeVar("_GT")


registered_models = {}


Expand Down Expand Up @@ -873,7 +881,7 @@ def get_queryset(self):
)


class HistoricForeignKey(ForeignKey):
class HistoricForeignKey(ForeignKey[_ST, _GT]):
"""
Allows foreign keys to work properly from a historic instance.

Expand Down