Skip to content

Commit 55f5e1f

Browse files
committed
Fix analytics to work with Django ViewSet actions
1 parent 82206f2 commit 55f5e1f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

analytics/analytics.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from django.utils.termcolors import colorize
1111
from requests import Session
1212
from rest_framework.views import APIView
13+
from functools import wraps
1314

1415
from analytics.entries import (
1516
AnalyticsEntry,
@@ -151,6 +152,7 @@ def record_api_function(
151152
def decorator(func):
152153
explicit_args_names = func.__code__.co_varnames[: func.__code__.co_argcount]
153154

155+
@wraps(func)
154156
def wrapped_func(*args, **kwargs):
155157
explicit_args = analytics_recorder._extract_explicit_args(
156158
explicit_args_names, args, kwargs
@@ -205,6 +207,7 @@ def decorator(func):
205207
"UnaryFuncEntry can only be used with functions with a single argument"
206208
)
207209

210+
@wraps(func)
208211
def wrapped_func(*args, **kwargs):
209212
explicit_args = analytics_recorder._extract_explicit_args(
210213
explicit_args_names, args, kwargs

0 commit comments

Comments
 (0)