We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1329f55 commit 1593d4aCopy full SHA for 1593d4a
bolt-admin/bolt/admin/views/base.py
@@ -168,13 +168,15 @@ def get_objects(self) -> list:
168
return []
169
170
def get_fields(self) -> list:
171
- return self.fields
+ return (
172
+ self.fields.copy()
173
+ ) # Avoid mutating the class attribute if using append etc
174
175
def get_actions(self) -> dict[str]:
- return self.actions
176
+ return self.actions.copy() # Avoid mutating the class attribute itself
177
178
def get_filters(self) -> list[str]:
- return self.filters
179
+ return self.filters.copy() # Avoid mutating the class attribute itself
180
181
def get_object_field(self, obj, field: str):
182
# Try basic dict lookup first
0 commit comments