Hello,
I followed the default install process, no tweak.
python manage.py oscar_accounts_init
Traceback (most recent call last):
File "/home/pm/Documents/github/django_tests/django-oscar/frobshop/manage.py", line 22, in <module>
main()
File "/home/pm/Documents/github/django_tests/django-oscar/frobshop/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/home/pm/Documents/github/django_tests/django-oscar/oscar/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/home/pm/Documents/github/django_tests/django-oscar/oscar/lib/python3.10/site-packages/django/core/management/__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/pm/Documents/github/django_tests/django-oscar/oscar/lib/python3.10/site-packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/pm/Documents/github/django_tests/django-oscar/oscar/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
File "/home/pm/Documents/github/django_tests/django-oscar/oscar/lib/python3.10/site-packages/oscar_accounts/management/commands/oscar_accounts_init.py", line 10, in handle
create_default_accounts()
File "/home/pm/Documents/github/django_tests/django-oscar/oscar/lib/python3.10/site-packages/oscar_accounts/setup.py", line 12, in create_default_accounts
sales.accounts.create(name=names.REDEMPTIONS)
File "/home/pm/Documents/github/django_tests/django-oscar/oscar/lib/python3.10/site-packages/django/db/models/fields/related_descriptors.py", line 799, in create
return super(RelatedManager, self.db_manager(db)).create(**kwargs)
File "/home/pm/Documents/github/django_tests/django-oscar/oscar/lib/python3.10/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/pm/Documents/github/django_tests/django-oscar/oscar/lib/python3.10/site-packages/django/db/models/query.py", line 658, in create
obj.save(force_insert=True, using=self.db)
File "/home/pm/Documents/github/django_tests/django-oscar/oscar/lib/python3.10/site-packages/oscar_accounts/abstract_models.py", line 149, in save
self.balance = self._balance()
File "/home/pm/Documents/github/django_tests/django-oscar/oscar/lib/python3.10/site-packages/oscar_accounts/abstract_models.py", line 153, in _balance
aggregates = self.transactions.aggregate(sum=Sum('amount'))
File "/home/pm/Documents/github/django_tests/django-oscar/oscar/lib/python3.10/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/pm/Documents/github/django_tests/django-oscar/oscar/lib/python3.10/site-packages/django/db/models/fields/related_descriptors.py", line 718, in get_queryset
raise ValueError(
ValueError: 'Account' instance needs to have a primary key value before this relationship can be used.
Tables are in place:
python manage.py migrate oscar_accounts
Operations to perform:
Apply all migrations: oscar_accounts
Running migrations:
No migrations to apply.
Hello, I followed the default install process, no tweak.
Tables are in place:
My versions:
Any idea?