Merge branch 'develop' of ssh://gl.id-east.ru:222/gm/gm-backend into develop
This commit is contained in:
commit
a44081c2e7
|
|
@ -1,5 +1,3 @@
|
|||
from pprint import pprint
|
||||
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.db.models import Q
|
||||
|
||||
|
|
@ -19,8 +17,6 @@ class Command(BaseCommand):
|
|||
Q(mark__isnull=True)
|
||||
).filter(aasm_state='published').values_list('establishment_id', 'mark', 'updated_at')
|
||||
|
||||
print(queryset.count())
|
||||
|
||||
for es_id, new_mark, new_date in queryset:
|
||||
try:
|
||||
mark, date = valid_data[es_id]
|
||||
|
|
@ -41,6 +37,5 @@ class Command(BaseCommand):
|
|||
establishment.public_mark = int(value[0])
|
||||
establishment.save()
|
||||
count += 1
|
||||
break
|
||||
|
||||
self.stdout.write(self.style.WARNING(f'Updated {count} objects.'))
|
||||
|
|
|
|||
|
|
@ -172,8 +172,9 @@ class SiteSettings(ProjectBaseMixin):
|
|||
|
||||
@property
|
||||
def published_sitefeatures(self):
|
||||
return self.sitefeature_set\
|
||||
.filter(Q(published=True) and Q(feature__source__in=[PlatformMixin.WEB, PlatformMixin.ALL]))
|
||||
return self.sitefeature_set. \
|
||||
filter(Q(published=True) &
|
||||
Q(feature__source__in=[PlatformMixin.WEB, PlatformMixin.ALL]))
|
||||
|
||||
@property
|
||||
def site_url(self):
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user