Просмотр исходного кода

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 лет назад
Родитель
Сommit
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}',
                 name=f'{site.slug}-switch{i}',
                 site=site,
                 site=site,
                 status=DeviceStatusChoices.STATUS_PLANNED,
                 status=DeviceStatusChoices.STATUS_PLANNED,
-                role=switch_role
+                device_role=switch_role
             )
             )
             switch.full_clean()
             switch.full_clean()
             switch.save()
             switch.save()