line / promgen

Promgen is a configuration file generator for Prometheus
https://line.github.io/promgen/
MIT License
1.04k stars 150 forks source link

models.py: Rule: Check content_object before accessing it #470

Closed vincent-olivert-riera closed 6 months ago

vincent-olivert-riera commented 6 months ago

We have noticed that deleting projects that contain rules throw an error than can be seen on user's side as an "Internal Error!" page.

This occurs because the rule's "content_object.name" is trying to be accessed after the project has been deleted, therefore "content_object" is None and does not contain a "name" member.