Fix publish collect
This commit is contained in:
parent
e9b0d0f91b
commit
c51cfc1aa4
|
|
@ -108,7 +108,8 @@ class Command(BaseCommand):
|
|||
distinct
|
||||
a.id,
|
||||
a.collection_id,
|
||||
a.establishment_id
|
||||
a.establishment_id,
|
||||
a.active
|
||||
from
|
||||
(
|
||||
select distinct
|
||||
|
|
@ -160,6 +161,7 @@ class Command(BaseCommand):
|
|||
if est.exists():
|
||||
inst = est.first()
|
||||
collect = Collection.objects.filter(old_id=obj['collection_id'])
|
||||
collect.update(is_publish=obj['active'])
|
||||
print(f'COLLECT COUNT {collect.count()}')
|
||||
inst.collections.add(*list(collect))
|
||||
# for c in collect:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user