From 41cfbd950ab721bf35c1e739f7bcefeb6a36e989 Mon Sep 17 00:00:00 2001 From: Christian Regnery Date: Tue, 21 May 2024 15:25:53 +0000 Subject: [PATCH] Update test.py --- test.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test.py b/test.py index e69de29..b7d7ca5 100644 --- a/test.py +++ b/test.py @@ -0,0 +1,14 @@ +from extras.scripts import * +from ipam.models import IPAddress + + +class Testing(Script): + + def run(self, data, commit): + ip_object = IPAddress.objects.get(address="10.1.1.1/16") + + if ip_object: + ip_object.description = "Testing" + ip_object.custom_field_data["test"] = "Testing" + ip_object.save() +