• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

allegro / ralph / 7886
85%

Build:
DEFAULT BRANCH: ng
Ran 26 Apr 2017 09:05AM UTC
Jobs 1
Files 230
Run time 11s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
7886

Pull #3035

travis-ci

web-flow
Fix `polymorphic_objects` in prefetch related, when base model is filtered

Based on example with Operation and BaseObject: it happened,
that when Operation objects were filtered, `polymorphic_filter`
still contains `Operation.objects.all()`, so all BaseObjects with
particular id(s) which have corresponding Operation (any! not only
the ones filtered in base query) were fetched from DB - but (here
comes the magic!) we were iteration through PKs of objects (BaseObject)
from original query and yield them in the same amount as they occur in
original query (so if there were 3 BaseObjects with PK 1234 in
original query, a lot more objects could be fetched, but only 3
of them were returned, and they might not correspond to current query
of base model (Operation)).

Right now, every fetched object is returned.
Pull Request #3035: Handle m2m prefetching in polymorphic

24 of 24 new or added lines in 1 file covered. (100.0%)

12248 of 14442 relevant lines covered (84.81%)

0.85 hits per line

Coverage Regressions

Lines Coverage ∆ File
99
100.0
src/ralph/virtual/management/commands/openstack_sync.py
21
100.0
src/ralph/virtual/admin.py
14
100.0
src/ralph/virtual/models.py
1
100.0
src/ralph/lib/polymorphic/models.py
Jobs
ID Job ID Ran Files Coverage
3 7886.3 (DJANGO_VERSION=1.8.18 TEST_DB_ENGINE=psql) 26 Apr 2017 09:06AM UTC 0
84.81
Travis Job 7886.3
Source Files on build 7886
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #7886
  • Pull Request #3035
  • PR Base - ng (#7857)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc