fix collection establishment in_fav
This commit is contained in:
parent
d0fec2591f
commit
dc0b4ce107
|
|
@ -66,7 +66,7 @@ class CollectionEstablishmentListView(CollectionListView):
|
|||
# May raise a permission denied
|
||||
self.check_object_permissions(self.request, collection)
|
||||
|
||||
return collection.establishments.all()
|
||||
return collection.establishments.all().annotate_in_favorites(self.request.user)
|
||||
|
||||
|
||||
# Guide
|
||||
|
|
|
|||
19
apps/location/migrations/0027_auto_20191118_1011.py
Normal file
19
apps/location/migrations/0027_auto_20191118_1011.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Generated by Django 2.2.4 on 2019-11-18 10:11
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('location', '0026_country_is_active'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='winesubregion',
|
||||
name='wine_region',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='wine_sub_region', to='location.WineRegion', verbose_name='wine sub region'),
|
||||
),
|
||||
]
|
||||
Loading…
Reference in New Issue
Block a user