-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Django RQ admin shows errors for circuit webhooks #2623
Comments
This is happening because the webhook is passed only the model class (rather than an instance), but trying to access
The best approach is probably to tweak the |
To avoid confusion, I've opened #2627 to address the root cause of this bug. Marking this as blocked. |
While #2627 is a good idea, this specific issue was addressed by simply not passing the model class to the rqworker process. All we actually needed was the model_name attribute anyway, so we can just pass that as a string. |
Thanks @lampwins and @jeremystretch . The help is much appreciated 👍 |
Environment
Steps to Reproduce
Create a webhook for circuits with the following settings:
Object type: Circuits -> Circuit
Name: test_circuit_hook
Type: Update
URL: https://example.com/webhook/
HTTP Content type: JSON
No secret
Enabled
SSL Verification enabled.
-> Save
Create a test circuit:
cid: test-001
Provider: test provider
Type: Internet
Status: Active
Tenant: Test tenant
Install_date, commit_rate, description, comments empty
No custom fields
Save the circuit.
No go back and edit the circuit. Change the cid to test-002. This will trigger the webhook. It doesn't matter if it fails or succeeds.
Go to the Django Admin -> Django RQ -> Queues -> Failed or Succeeded jobs list
Select a job for the circuit:
It throws a django error page:
The object definitely has a provider assigned to it:
Expected Behavior
I expect to see a detail page for the (failed/succeeded) job
Observed Behavior
Django error page:
The text was updated successfully, but these errors were encountered: