File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 55 "MonitorServiceToken" ,
66 "AggregateFunction" ,
77]
8- from dataclasses import dataclass
8+ from dataclasses import dataclass , field
99from typing import List , Optional
1010
1111from linode_api4 .objects .base import Base , Property
@@ -124,7 +124,22 @@ class DashboardWidget(JSONObject):
124124 y_label : str = ""
125125 aggregate_function : AggregateFunction = ""
126126 group_by : Optional [List [str ]] = None
127- filters : Optional [List [Filter ]] = None
127+ _filters : Optional [List [Filter ]] = field (
128+ default = None , metadata = {"json_key" : "filters" }
129+ )
130+
131+ def __getattribute__ (self , name ):
132+ """Override to handle the filters attribute specifically to avoid metaclass conflict."""
133+ if name == "filters" :
134+ return object .__getattribute__ (self , "_filters" )
135+ return object .__getattribute__ (self , name )
136+
137+ def __setattr__ (self , name , value ):
138+ """Override to handle setting the filters attribute."""
139+ if name == "filters" :
140+ object .__setattr__ (self , "_filters" , value )
141+ else :
142+ object .__setattr__ (self , name , value )
128143
129144
130145@dataclass
You can’t perform that action at this time.
0 commit comments