Procházet zdrojové kódy

Avoid setting mutable panel actions

Jeremy Stretch před 2 týdny
rodič
revize
b91dc1243b
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4 1
      netbox/netbox/ui/panels.py

+ 4 - 1
netbox/netbox/ui/panels.py

@@ -53,7 +53,10 @@ class Panel:
     def __init__(self, title=None, actions=None):
         if title is not None:
             self.title = title
-        self.actions = actions or self.actions or []
+        if actions is not None:
+            self.actions = actions
+        if self.actions is None:
+            self.actions = []
 
     def get_context(self, context):
         """