Skip to content

Conversation

@Floris272
Copy link
Contributor

Fixes #689

Changes

  • set notif resource to object.

the resource was set to objectrecord because its fetched from the viewset queryset within NotificationMixinBase.

This pr just sets it to object hardcoded. Another solution would be to completely override the mxinxbase so that resource can become:

resource = (  
            new_cls.notification_resource._meta.model_name  
            or new_cls.queryset.model._meta.model_name  
        )  

so that notification_resource can be defined on the viewset but it seemed a bit overkill.

@codecov-commenter
Copy link

codecov-commenter commented Nov 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.00%. Comparing base (a54a03d) to head (1b1900c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #696      +/-   ##
==========================================
+ Coverage   83.96%   84.00%   +0.04%     
==========================================
  Files         131      131              
  Lines        2488     2495       +7     
  Branches      198      199       +1     
==========================================
+ Hits         2089     2096       +7     
  Misses        354      354              
  Partials       45       45              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Floris272 Floris272 requested a review from stevenbal November 5, 2025 12:49
@Floris272 Floris272 marked this pull request as ready for review November 5, 2025 12:50
@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

🐰 Bencher Report

Branchissue/689-notif-docs-incorrect
Testbedubuntu-latest

🚨 3 Alerts

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
performance_test/tests/test_objects_list.py::test_objects_api_list_filter_by_object_typeLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
139.63 ms
(+15.64%)Baseline: 120.74 ms
126.78 ms
(110.13%)

performance_test/tests/test_objects_list.py::test_objects_api_list_large_page_size_page_1Latency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
271.45 ms
(+7.26%)Baseline: 253.09 ms
265.74 ms
(102.15%)

performance_test/tests/test_objects_list.py::test_objects_api_list_large_page_size_page_5Latency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
273.57 ms
(+7.55%)Baseline: 254.37 ms
267.09 ms
(102.43%)

Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
performance_test/tests/test_objects_list.py::test_objects_api_list_filter_by_object_type📈 view plot
🚷 view threshold
🚨 view alert (🔔)
139.63 ms
(+15.64%)Baseline: 120.74 ms
126.78 ms
(110.13%)

performance_test/tests/test_objects_list.py::test_objects_api_list_filter_one_result📈 view plot
🚷 view threshold
21.89 ms
(+4.80%)Baseline: 20.89 ms
21.93 ms
(99.81%)
performance_test/tests/test_objects_list.py::test_objects_api_list_large_page_size_page_1📈 view plot
🚷 view threshold
🚨 view alert (🔔)
271.45 ms
(+7.26%)Baseline: 253.09 ms
265.74 ms
(102.15%)

performance_test/tests/test_objects_list.py::test_objects_api_list_large_page_size_page_5📈 view plot
🚷 view threshold
🚨 view alert (🔔)
273.57 ms
(+7.55%)Baseline: 254.37 ms
267.09 ms
(102.43%)

performance_test/tests/test_objects_list.py::test_objects_api_list_small_page_size_page_20📈 view plot
🚷 view threshold
127.77 ms
(+4.11%)Baseline: 122.72 ms
128.86 ms
(99.15%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Collaborator

@stevenbal stevenbal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Floris272 could you change the git issue in the commit message from OAF#188 to #689?

@Floris272 Floris272 force-pushed the issue/689-notif-docs-incorrect branch from 797f893 to 1b1900c Compare November 5, 2025 13:44
@Floris272 Floris272 merged commit d810a8b into master Nov 5, 2025
27 checks passed
@Floris272 Floris272 deleted the issue/689-notif-docs-incorrect branch November 5, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notification documentation includes incorrect resource

4 participants