~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/model/distroseriesdifference.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-08-16 13:03:42 UTC
  • mfrom: (13687.3.5 bug-826659)
  • Revision ID: launchpad@pqm.canonical.com-20110816130342-7b2z6s7ks2p39exq
[r=lifeless,
        wallyworld][bug=826659] Don't filter DSDs by type if no type filter
        is given.

Show diffs side-by-side

added added

removed removed

Lines of Context:
443
443
                           child_version_higher=False, parent_series=None,
444
444
                           packagesets=None, changed_by=None):
445
445
        """See `IDistroSeriesDifferenceSource`."""
446
 
        if difference_type is None:
447
 
            difference_type = DistroSeriesDifferenceType.DIFFERENT_VERSIONS
448
446
        if status is None:
449
447
            status = (DistroSeriesDifferenceStatus.NEEDS_ATTENTION,)
450
448
        elif isinstance(status, DBItem):
462
460
 
463
461
        conditions = [
464
462
            DSD.derived_series == distro_series,
465
 
            DSD.difference_type == difference_type,
466
463
            DSD.source_package_name == SPN.id,  # For ordering.
467
464
            DSD.status.is_in(status),
468
465
            ]
 
466
        if difference_type is not None:
 
467
            conditions.append(DSD.difference_type == difference_type)
469
468
 
470
469
        if child_version_higher:
471
470
            conditions.append(DSD.source_version > DSD.parent_source_version)