cleanup migrations, remove pint to speed up base conversion and calculate properties on converted ingredients

This commit is contained in:
vabene1111
2023-05-06 22:21:27 +02:00
parent 2cc7278865
commit 19f5da77b2
14 changed files with 249 additions and 322 deletions

View File

@@ -160,7 +160,8 @@ class OpenDataImporter:
update_list.append(Food(id=existing_food_id, open_data_slug=k, ))
Food.load_bulk(insert_list, None)
Food.objects.bulk_update(update_list, update_field_list)
if len(update_list) > 0:
Food.objects.bulk_update(update_list, update_field_list)
self._update_slug_cache(Food, 'food')