Skip to content

Commit

Permalink
Fix queue lookup in Job enqueue
Browse files Browse the repository at this point in the history
  • Loading branch information
alehaa committed Jul 25, 2024
1 parent 3e1cc1b commit bcad8cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netbox/core/models/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def enqueue(cls, func, instance=None, name='', user=None, schedule_at=None, inte
object_id = instance.pk
else:
object_type = object_id = None
rq_queue_name = get_queue_for_model(object_type.model)
rq_queue_name = get_queue_for_model(object_type.model if object_type else None)
queue = django_rq.get_queue(rq_queue_name)
status = JobStatusChoices.STATUS_SCHEDULED if schedule_at else JobStatusChoices.STATUS_PENDING
job = Job.objects.create(
Expand Down

0 comments on commit bcad8cf

Please sign in to comment.