mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-02 03:30:54 +00:00
CI updates (#6167)
* replaced flake8 with ruff mostly for speed improvements * fix codespell error * move config section * added isort again * move djlint config to pyproject * moved ruff section * remove flake8 from code base * remove flake8 from code base * fix djlint syntax * fix removed sections * fix requirements file * fix getattr useage * auto fixed docstring * adapted ruff settings to better fit code base * reorder order of operations * adjust checks * disable autofix/format * fixed reqs * remove flake8 section from setup.cfg * moved isort config * added missing toml req * fixed req * fixed source path
This commit is contained in:
@ -336,9 +336,9 @@ def trigger_notification(obj, category=None, obj_ref='pk', **kwargs):
|
||||
|
||||
# Try with some defaults
|
||||
if not obj_ref_value:
|
||||
obj_ref_value = getattr(obj, 'pk')
|
||||
obj_ref_value = getattr(obj, 'pk', None)
|
||||
if not obj_ref_value:
|
||||
obj_ref_value = getattr(obj, 'id')
|
||||
obj_ref_value = getattr(obj, 'id', None)
|
||||
if not obj_ref_value:
|
||||
raise KeyError(f"Could not resolve an object reference for '{str(obj)}' with {obj_ref}, pk, id")
|
||||
|
||||
|
Reference in New Issue
Block a user