You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Method runs the job in web_request_context which dynamically generates a request
Observed Behavior
Exception:
18:29:52.547 INFO nautobot.jobs.ExampleJob jobs.py run_job() :
Running job (commit=True)
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/source/nautobot/utilities/testing/__init__.py", line 102, in run_job_for_testing
run_job(data=data, request=wrapped_request, commit=commit, job_result_pk=job_result.pk)
File "/usr/local/lib/python3.10/site-packages/celery/local.py", line 188, in __call__
return self._get_current_object()(*a, **kw)
File "/usr/local/lib/python3.10/site-packages/celery/app/task.py", line 392, in __call__
return self.run(*args, **kwargs)
File "/source/nautobot/extras/jobs.py", line 1251, in run_job
change_context = context_class(user=request.user, context_detail=job_model.slug)
AttributeError: '_GeneratorContextManager' object has no attribute 'user'
The text was updated successfully, but these errors were encountered:
Environment
Steps to Reproduce
Expected Behavior
Method runs the job in
web_request_context
which dynamically generates a requestObserved Behavior
Exception:
The text was updated successfully, but these errors were encountered: