소스 검색

Fix custom script documentation example script

The example script still uses the old "role" field when creating
a Device object.

Fixes #15052
Anders Harrisson 2 년 전
부모
커밋
4afebd3565
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      docs/customization/custom-scripts.md

+ 1 - 1
docs/customization/custom-scripts.md

@@ -390,7 +390,7 @@ class NewBranchScript(Script):
                 name=f'{site.slug}-switch{i}',
                 site=site,
                 status=DeviceStatusChoices.STATUS_PLANNED,
-                role=switch_role
+                device_role=switch_role
             )
             switch.full_clean()
             switch.save()