Fix mark
This commit is contained in:
parent
b146e6cd24
commit
968ae4246b
|
|
@ -28,6 +28,7 @@ def transfer_reviews():
|
|||
WHERE reviews.reviewer_id > 0
|
||||
AND reviews.reviewer_id IS NOT NULL
|
||||
AND review_texts.text IS NOT NULL
|
||||
AND reviews.mark IS NOT NULL
|
||||
AND reviews.reviewer_id IN (
|
||||
SELECT accounts.id
|
||||
FROM accounts
|
||||
|
|
@ -58,7 +59,10 @@ def transfer_reviews():
|
|||
if serialized_data.is_valid():
|
||||
serialized_data.save()
|
||||
for establishment_id, mark in establishments_mark_list.items():
|
||||
establishment = Establishment.objects.get(old_id=establishment_id)
|
||||
try:
|
||||
establishment = Establishment.objects.get(old_id=establishment_id)
|
||||
except Establishment.DoesNotExist:
|
||||
continue
|
||||
establishment.public_mark = mark
|
||||
establishment.save()
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user