dylanleigh / PriceAndNutritionTrackingSystem

PANTS is a self-hosted, open-source nutrition tracker and tool for nutritional data analysis of ingredients and recipes.
Apache License 2.0
116 stars 26 forks source link

Error when adding the author's sample Ingredient data: user `testuserbob` doesn't exist #10

Closed osagga closed 4 years ago

osagga commented 4 years ago

I did a fresh install, and tried to run the following command:

./manage.py loaddata fixtures/pants-ingredient-fixture.json

but I got the following error

 raise DeserializationError.WithData(e, label, self.object.pk, field_value)
django.core.serializers.base.DeserializationError: User matching query does not exist.: (ingredients.ingredient:pk=234) field_value was '['testuserbob']'

I think the issue has to do with this entry https://github.com/dylanleigh/PriceAndNutritionTrackingSystem/blob/6b654dcb6ad5902554471d98000a719f06ec03d9/pants/fixtures/pants-ingredient-fixture.json#L6233-L6258

since it references the user testuserbob which is not setup in my fresh install.

Removing that entry and running the command again seems to fix it. I can make a PR with this fix, but not sure if that's a bug, or expected?