Fix Wagtail transaction names#1705
Conversation
✅MegaLinter analysis: Success
Notices📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining See detailed reports in MegaLinter artifacts
|
a284b4d to
9fd7f38
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1705 +/- ##
=======================================
Coverage 82.06% 82.06%
=======================================
Files 216 216
Lines 26786 26807 +21
Branches 4238 4243 +5
=======================================
+ Hits 21981 21999 +18
- Misses 3339 3340 +1
- Partials 1466 1468 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
49a14e6 to
58ac6f0
Compare
| try: | ||
| from wagtail.models.pages import Page | ||
| except: | ||
| Page = None | ||
| if instance and isinstance(instance, Page): |
There was a problem hiding this comment.
Can we maybe move this import to an import-hook and export it to the module level to avoid the overhead of constantly trying to import this for the vast majority of customers that don't have wagtail? We can change this if to check if Page is not none and ... and set Page to None by default.
There was a problem hiding this comment.
Because there was already the same import hook in the wagtail hook module I had to move the wagtail import hook to the django module to make this work. Let me know your thoughts and if you'd prefer a different approach.
Co-authored-by: Hannah Stepanek <hmstepanek@gmail.com>
ba9bf35 to
e253a3e
Compare
…ewrelic-python-agent into fix-wagtail-transaction-names

Overview
Fix Wagtail transaction names.
Related Github Issue
Fixes #1573.