def clean_canonicals(b1, b2, new_snapshot):
    latest_canon = new_snapshot.canonical_building
    for p in [b1, b2]:
        canon = p.canonical_building
        if canon and latest_canon and canon.pk != latest_canon.pk:
            canon.active = False
            canon.save()
Returns all objects of this type for the keyword arguments given.
dataset/ETHPy150Open buildingenergy/buildingenergy-platform/seed/models.py/clean_canonicals--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/contenttypes/models.py/ContentType.get_all_objects_for_this_type