Skip to content

Commit

Permalink
made updates per PR conversation
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanHyatt committed Feb 10, 2024
1 parent 2865b77 commit db93801
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions django_tables2/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,12 @@ class Accessor(str):
"Failed lookup for key [{key}] in {context}, when resolving the accessor {accessor}"
)

def __init__(self, object, *callable_args, **callable_kwargs):
self.callable_args = callable_args
self.callable_kwargs = callable_kwargs
def __init__(self, value, callable_args=None, callable_kwargs=None):
self.callable_args = callable_args or []
self.callable_kwargs = callable_kwargs or {}
super().__init__()

def __new__(cls, value, *args, **kwargs):
def __new__(cls, value, callable_args=None, callable_kwargs=None):
instance = super().__new__(cls, value)
if cls.LEGACY_SEPARATOR in value:
instance.SEPARATOR = cls.LEGACY_SEPARATOR
Expand Down

0 comments on commit db93801

Please sign in to comment.