mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-14 15:52:18 -06:00
Merge branch 'main' into feature
Some checks are pending
CI / build (20.x, 3.13) (push) Waiting to run
CI / build (20.x, 3.12) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, actions) (push) Waiting to run
Some checks are pending
CI / build (20.x, 3.13) (push) Waiting to run
CI / build (20.x, 3.12) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, actions) (push) Waiting to run
This commit is contained in:
@@ -384,6 +384,9 @@ class ObjectPermissionForm(forms.ModelForm):
|
||||
elif self.initial:
|
||||
# Handle cloned objects - actions come from initial data (URL parameters)
|
||||
if 'actions' in self.initial:
|
||||
# Normalize actions to a list of strings
|
||||
if isinstance(self.initial['actions'], str):
|
||||
self.initial['actions'] = [self.initial['actions']]
|
||||
if cloned_actions := self.initial['actions']:
|
||||
for action in ['view', 'add', 'change', 'delete']:
|
||||
if action in cloned_actions:
|
||||
|
||||
Reference in New Issue
Block a user