Skip to content

Commit dc672e1

Browse files
committed
find request on history_instance.thread instead
1 parent 46fe5f1 commit dc672e1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docs/advanced.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,8 @@ source model. This is possible by combining the ``bases`` functionality with the
391391
392392
# define your signal handler/callback anywhere outside of models.py
393393
def add_history_ip_address(sender, **kwargs):
394-
instance = kwargs['instance']
395394
history_instance = kwargs['history_instance']
396-
history_instance.ip_address = instance.request.META['REMOTE_ADDR']
395+
history_instance.ip_address = history_instance.request.META['REMOTE_ADDR']
397396
398397
399398
.. code-block:: python

0 commit comments

Comments
 (0)