Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/celery/app/trace.py", line 477, in trace_task
R = retval = fun(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/celery/app/trace.py", line 760, in __protected_call__
return self.run(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/nautobot/extras/jobs.py", line 1136, in run_job
result = job(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/nautobot/extras/jobs.py", line 149, in __call__
return self.run(*args, **deserialized_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/nautobot_design_builder/design_job.py", line 143, in run
return self._run_in_transaction(dryrun, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/contextlib.py", line 81, in inner
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/nautobot_design_builder/design_job.py", line 212, in _run_in_transaction
raise ex
File "/usr/local/lib/python3.11/site-packages/nautobot_design_builder/design_job.py", line 192, in _run_in_transaction
self.post_implementation(context, self.environment)
File "/opt/nautobot/git/nb2_jobs/designs/new_device_registration/jobs.py", line 64, in post_implementation
current_device = Device.objects.get(name=context["device_hostname"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/db/models/query.py", line 435, in get
raise self.model.DoesNotExist(
nautobot.dcim.models.devices.Device.DoesNotExist: Device matching query does not exist.
Environment
Expected Behavior
Having access to objects that you created during the run method in the
post_implementation
method.Observed Behavior
When using
!ref:create:name
for example on a device, if you change it to!ref:create_or_update:name
it works.Steps to Reproduce
post_implementation
method and try toget
the device object that was just created.